Trigger validation by email #537
Answered
by
kenjis
AlbertoMoricca
asked this question in
Q&A
|
Hi, I read the documentation available but I didn't understand how to trigger the validation of the user by email included in Shield after the user registration. I edited the Auth.php with the following code as specified in documentation: But my question is: How can I trigger the email activator in the registration controller? Following the last instructions of my registration controller code: $users = model('UserModel');
$user = new User([
'username' => $this->request->getVar('email'),
'email' => $this->request->getVar('email'),
'password' => $this->request->getVar('password')
]);
$users->save($user);
return redirect()->to('/home');Thanks and best regards, |
Answered by
kenjis
Nov 22, 2022
Replies: 1 comment 3 replies
|
See the Shield |
3 replies
Answer selected by
AlbertoMoricca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See the Shield
RegisterController:https://github.com/codeigniter4/shield/blob/develop/src/Controllers/RegisterController.php#L56