You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added an additional criteria to the authenticate() call in Sentinel as I have a column in my users table called 'enabled'. That needs to be set to 1 for a user to login. My authentication request to Sentinel is as follows:
if (Sentinel::authenticate(['username'=> $request->log, 'password' => $request->pwd, 'enabled' => 1],$rememberMe)){
however even for users where the record is set to 0, the authentication still passes. It seems that this enabled field is just ignored completely.
What am I doing wrong ?
The text was updated successfully, but these errors were encountered:
Then on the extended User model, you need to add a protected $loginNames = ['email', 'enabled']; property, which be default only contains the email field.
I have added an additional criteria to the authenticate() call in Sentinel as I have a column in my users table called 'enabled'. That needs to be set to 1 for a user to login. My authentication request to Sentinel is as follows:
if (Sentinel::authenticate(['username'=> $request->log, 'password' => $request->pwd, 'enabled' => 1],$rememberMe)){
however even for users where the record is set to 0, the authentication still passes. It seems that this enabled field is just ignored completely.
What am I doing wrong ?
The text was updated successfully, but these errors were encountered: