diff options
| author | astaf <astaf@proxy.ccwn.org.ccwn.org> | 2012-06-26 17:11:26 +0200 |
|---|---|---|
| committer | astaf <astaf@proxy.ccwn.org.ccwn.org> | 2012-06-26 17:11:26 +0200 |
| commit | f0e90d88a5766e67ff69339b27711ffb5f41e1ca (patch) | |
| tree | 387f30bc7cd39114f6db71a7deb7d5f16442c03c /protected/models | |
| parent | 1a52e642b8bb388fd4c4b29798fa3809a2114c9f (diff) | |
| parent | d58f7cf02dc0c5ce2df2f0db00361fe673074be8 (diff) | |
Merge branch 'master' of ssh://proxy:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/models')
| -rw-r--r-- | protected/models/User.php | 7 | ||||
| -rw-r--r-- | protected/models/Verein.php | 2 |
2 files changed, 5 insertions, 4 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); } diff --git a/protected/models/Verein.php b/protected/models/Verein.php index 83fc21f..8556f48 100644 --- a/protected/models/Verein.php +++ b/protected/models/Verein.php @@ -106,7 +106,7 @@ class Verein extends CActiveRecord $criteria->compare('url',$this->url,true); $criteria->compare('bild',$this->bild,true); $criteria->compare('email',$this->email,true); - $criteria->compare('slug',$this->slug,true); + $criteria->compare('slug',$this->slug); $criteria->compare('kontaktdaten',$this->kontaktdaten,true); $criteria->compare('beschreibung',$this->beschreibung,true); $criteria->compare('standort_id',$this->standort_id); |
