Model+Controllers: Make failed login attempt check consistent
This commit is contained in:
@@ -3,5 +3,18 @@
|
||||
namespace App\Model;
|
||||
|
||||
class UserModel extends Model {
|
||||
|
||||
protected $table = 'user';
|
||||
|
||||
//-------------------------------------//
|
||||
|
||||
public function loginAllowed(): bool
|
||||
{
|
||||
if (property_exists($this, 'failed_login_attempt') && $this->failed_login_attempt < 5) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user