Example #1
0
 /**
 * perform one-way encryption on the password before we store it in
 the database
 */
 protected function afterValidate()
 {
     parent::afterValidate();
     $this->password = $this->encrypt($this->password);
 }
Example #2
0
 /**
  * Returns the static model of the specified AR class.
  * @return Issue the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Example #3
0
 /**
  * apply a hash on the password before we store it in the database
  */
 protected function afterValidate()
 {
     parent::afterValidate();
     //ensure we don't have any other errors
     if (!$this->hasErrors()) {
         $this->password = $this->hashPassword($this->password);
     }
 }