Replies: 1 comment 5 replies
-
Hello I used if (! $user->isActivated()) {
$user->activate();
$response['status'] = 'activated';
} else {
$response['error'] = lang("Users.UserIsAlreadyActivated");
}
return $response; into: if (! $user->isActivated()) {
$user->activate();
$UserIdentityModel = new UserIdentityModel();
$UserIdentityModel->deleteIdentitiesByType($user,"email_activate");
$response['status'] = 'activated';
} else {
$response['error'] = lang('Users.UserIsAlreadyActivated');
}
return $response; I use is that best the way to do that? or there is another best way to do it? Thanks |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is there any way to clear
email_activate
for the user which is on database tableauth_identities
because even if I activate the user email using:
and the user try to login it will be asked to activate email account while his email is already activated if there is
email_activate
row in database table.while I make sure fro the databse and the user looks it is active:
but because he has row in auth_identities for
email_activate
it still ask for tokenhow to remove this raw after activate the user account when running the code above.
is there any Available method for that in the entity or what?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions