summaryrefslogtreecommitdiff
path: root/protected/models/User.php
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:31:16 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:31:16 +0200
commitd58f7cf02dc0c5ce2df2f0db00361fe673074be8 (patch)
treede5b7064e43255a471de4cb469a7db71bce3d328 /protected/models/User.php
parent82f5b7dc1890c03ebec349225e76ea0b22ec6c1d (diff)
Änderungen das alles tut, editor, cms
Diffstat (limited to 'protected/models/User.php')
-rw-r--r--protected/models/User.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/protected/models/User.php b/protected/models/User.php
index e601042..76cffe7 100644
--- a/protected/models/User.php
+++ b/protected/models/User.php
@@ -90,12 +90,13 @@ class User extends CActiveRecord
$this->created_at = new CDbExpression("NOW()");
$this->salt = $this->generateRandomKey();
$this->admin_pw_reset = true;
- }
+
if (!$this->checkPassword($this->password)) {
$this->password = $this->encryptPassword($this->password);
- }
+ }
+ }
return parent::beforeSave();
}
@@ -148,7 +149,7 @@ class User extends CActiveRecord
return $pw;
}
- protected function encryptPassword($password) {
+ public function encryptPassword($password) {
return sha1($this->salt.$password);
}