/** * {@inheritDoc} * @return boolean */ public function beforeSave() { $this->addProfile(); $this->addUserGroups(); $this->validator = new modUserValidation($this, $this->object, $this->profile); $this->validator->validate(); return parent::beforeSave(); }
public function beforeSave() { $this->setProfile(); $this->setRemoteData(); $this->validator = new modUserValidation($this, $this->object, $this->profile); $this->validator->validate(); return parent::beforeSave(); }
/** * {@inheritDoc} * @return boolean */ public function beforeSave() { $this->addProfile(); $sudo = $this->getProperty('sudo', null); if ($sudo !== null) { $this->object->setSudo(!empty($sudo)); } $this->validator = new modUserValidation($this, $this->object, $this->profile); $this->validator->validate(); return parent::beforeSave(); }
/** * {@inheritDoc} * @return boolean */ public function beforeSave() { $this->setProfile(); $this->setRemoteData(); $sudo = $this->getProperty('sudo', null); if ($sudo !== null) { $this->object->setSudo(!empty($sudo)); } $this->validator = new modUserValidation($this, $this->object, $this->profile); $this->validator->validate(); $canChangeStatus = $this->checkActiveChange(); if ($canChangeStatus !== true) { $this->addFieldError('active', $canChangeStatus); } return parent::beforeSave(); }