From 88b3629f4f62b8af47fbef90a53bbe1bd232223b Mon Sep 17 00:00:00 2001 From: KeinBaum Date: Mon, 2 Jun 2014 19:11:02 +0200 Subject: [PATCH] #3623: Allow username "0" with FormAuthenticate --- lib/Cake/Controller/Component/Auth/FormAuthenticate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php index fb80730f06b..e37b4a70c5f 100644 --- a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php @@ -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; } }