From abe853a978f3e1231be258dabff7be79a7b8c5b5 Mon Sep 17 00:00:00 2001 From: the_undefined Date: Sun, 18 May 2008 23:49:51 +0000 Subject: [PATCH] Made Auth component find conditions more explicit, closes #4680 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6936 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/auth.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 14be81188..bc01afc31 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -732,16 +732,16 @@ class AuthComponent extends Object { return false; } $find = array( - $this->fields['username'] => $user[$this->fields['username']], - $this->fields['password'] => $user[$this->fields['password']] + $this->userModel.'.'.$this->fields['username'] => $user[$this->fields['username']], + $this->userModel.'.'.$this->fields['password'] => $user[$this->fields['password']] ); } elseif (isset($user[$this->userModel . '.' . $this->fields['username']]) && !empty($user[$this->userModel . '.' . $this->fields['username']])) { if (trim($user[$this->userModel . '.' . $this->fields['username']]) == '=' || trim($user[$this->userModel . '.' . $this->fields['password']]) == '=') { return false; } $find = array( - $this->fields['username'] => '= ' . $user[$this->userModel . '.' . $this->fields['username']], - $this->fields['password'] => '= ' . $user[$this->userModel . '.' . $this->fields['password']] + $this->userModel.'.'.$this->fields['username'] => '= ' . $user[$this->userModel . '.' . $this->fields['username']], + $this->userModel.'.'.$this->fields['password'] => '= ' . $user[$this->userModel . '.' . $this->fields['password']] ); } else { return false;