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 }
public function save($data) { $data['password'] = \Core\Util::encrypt($data['password']); parent::save($data); }