示例#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);
 }
示例#2
0
 /**
  * Returns the static model of the specified AR class.
  * @param string $className active record class name.
  * @return Comment the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }