Login Login Laravel - If DB field is not 0

Asked

Viewed 22 times

0

In the user table I have a field called 'status', it contains the hierarchical level of each user, if this field is '0' means that the user is disabled, if it is 1 or higher it means that the user is active and according to the numbering it is an admin, moderator or other function.

The question is: how do I, when the user logs in, check to see if the 'status' field is > 0 (or <> 0)?

  • read this link: https://answall.com/questions/162965/laravel-authatempt-sempre-retorna-false/162970#162970 it explains when fields are not in the standard Laravel but, your case is only to check if the field is greater than 0.

  • Another example: https://answall.com/questions/148446/autentica%C3%A7%C3%A3o-costumizada-com-Cpf-e-email/151477#151477

    • an example: https://answall.com/questions/187488/personalizando-uma-model-de-usuarios-laravel-5-4-problema-no-login/187535#187535
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.