mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
#3623: Allow username "0" with FormAuthenticate
This commit is contained in:
parent
3108217d73
commit
88b3629f4f
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class FormAuthenticate extends BaseAuthenticate {
|
|||
}
|
||||
foreach (array($fields['username'], $fields['password']) as $field) {
|
||||
$value = $request->data($model . '.' . $field);
|
||||
if (empty($value) || !is_string($value)) {
|
||||
if (empty($value) && $value !== "0" || !is_string($value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue