Skip to content

Commit

Permalink
#3623: Allow username "0" with FormAuthenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
nsfw-baum committed Jun 2, 2014
1 parent 3108217 commit 88b3629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/FormAuthenticate.php
Expand Up @@ -51,7 +51,7 @@ protected function _checkFields(CakeRequest $request, $model, $fields) {
}
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;
}
}
Expand Down

0 comments on commit 88b3629

Please sign in to comment.