Model+Controllers: Make failed login attempt check consistent

This commit is contained in:
Riyyi
2021-11-26 15:32:50 +01:00
parent e782ea5979
commit 5d3962bba4
3 changed files with 15 additions and 2 deletions
+13
View File
@@ -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;
}
}