I have added an email verification to the register process with Laravel 5.4. I am using the built-in Auth configuration as well. I want to now add a "verified" parameter to the authentication process. This used to work in earlier versions of 5.x, but I can't get it to work now.
Editing this file:
project\vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php
I would normally add the "verified" portion of the Login validation.
protected function validateLogin(Request $request)
{
$this->validate($request, [
$this->loginUsername() => 'required',
'password' => 'required',
'verified' => 1,
]);
}
This doesn't appear to be working in 5.4 now. I can login without verifed being true. Is there another way I can change this without touching any back-end classes or traits? Can I do this in the LoginController instead to make it easier to persist across Laravel upgrades?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire