n1bb Posted November 29, 2017 Posted November 29, 2017 Hello all, I am trying to set up a user management and started to play around with the login-register module . I found out that I can handle user similar to pages. So I did this $this->createUserReady($user); $user->addStatus(Page::statusUnpublished); $user->save(); The user is created and unpublished, so far so good. My problem is, when I want to publish the user via admin backend I need to set a password. The new user should just be published/activated. Did I miss something? Is this way working? I'm thankful for any hints.
dragan Posted November 29, 2017 Posted November 29, 2017 Users are pages. I guess the password is simply a required field. So, when you create a user via API, assign a password too.
n1bb Posted November 30, 2017 Author Posted November 30, 2017 Yes the pasword is a required field and it is set during the registration. Anyway I rethought the whole thing and came to the conclusion, that I just assign a check box to the users template which indicates if a user is activated or not. This will work for me. Thank you for your answer though.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now