Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add user (created by admin) automatically to related group?


  • JanDieckmann
    Participant

    @jandieckmann

    For the project I am working at, I have the following idea:

    – User can only by created by the admins
    – The usernames will by made of a persons first name and part of the date which corresponds to the event it is created for. E. g. there is an event in September 2016, the first username will be User1_Sep2016
    – For each event I will create a group named e. g. Event Sep 2016 (with a slug event-sep-2016)
    – The moment where I create a new user I like to have an automatism that add it to the group with the same date. So something like checking if there is a group with the same name ending like the latest user. (Would be easier if the date pattern were more equal, but it looks nicer and is easier when the username is without the hyphen and space and the group name with space/hyphen.

    As I am still on a beginner level of coding I tried by putting some pieces together that I found also here for similar solution but got lost somewhere.

    I am looking forward for some hints and advices that would help me to a quick solution.

  • You must be logged in to reply to this topic.
Skip to toolbar