graphql-authentication
graphql-authentication copied to clipboard
Fix for the issue #112
Fix for the issue #112
In Craft 4.* User element has active Boolean set to false by default (source)
This way currently in the create function of UserServiceactive flag is changed to true only in case if ($social && $skipSocialActivation) condition returns true.
I've added the following changes:
- set the default active value to true:
$user = new User();
$user->username = $email;
$user->email = $email;
$user->active = true;
- when
if ($requiresVerification || $suspendByDefault)condition is true, set the active flag back to false:
if ($requiresVerification || $suspendByDefault) {
$user->active = false;
$user->pending = true;
}
Hope that resolves the issue (in my case it does)