Trigger validation by email #537
-
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, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
See the Shield |
Beta Was this translation helpful? Give feedback.
See the Shield
RegisterController
:https://github.com/codeigniter4/shield/blob/develop/src/Controllers/RegisterController.php#L56