-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x]: Deactivate by default user setting not working #11519
Comments
That setting only comes into effect during public registration. If you were logged-in with your existing account when you submitted the registration form, then that’s just normal user registration (identical to creating a user from the control panel). |
I understand that, but I don't think it works. I am carrying out a public registration. Each time, the account is activated by default and I am able to log in as that user. |
I was able to reproduce this issue when the "Verify email addresses" setting is unchecked. |
Thanks! Just got this fixed for the next release. |
Craft 4.1.1 is out now with that fix. |
What happened?
Description
The deactivate by default setting for public user registrations does not work and is not used.
Specifically this part of the Users Controller's action "SaveUser" :
// If this is a new user and email verification isn't required, // go ahead and activate them now. if ($isNewUser && !$requireEmailVerification) { Craft::$app->getUsers()->activateUser($user); }
There is a var ($deactivateByDefault) that is not used in the logic above.
Steps to reproduce
Expected behavior
With the option above enabled, users should not be activated upon registration.
Actual behavior
Users are activated after creation.
Craft CMS version
4.0.5
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: