Exemplo n.º 1
0
 protected function beforeSave()
 {
     if ($this->new_password) {
         $this->password = $this->encrypt($this->new_password);
     }
     return parent::beforeSave();
 }