Beispiel #1
0
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         if ($this->isNewRecord) {
             if (UserIdentity::isCrypted($this->password)) {
                 $this->password = UserIdentity::crypt($this->password);
             }
         }
         return true;
     }
     return false;
 }