Exemplo n.º 1
0
 public function save()
 {
     //Hash password if new or password changed
     if (is_null($this->id) || $this->hashNeeded()) {
         $this->passwordHash();
     }
     parent::save();
     //Then return to original functionality
 }
Exemplo n.º 2
0
 public function save($data)
 {
     $data['password'] = \Core\Util::encrypt($data['password']);
     parent::save($data);
 }