Exemple #1
0
 /**
  * Populate model object properties by the passed data
  *
  * @param array $data Data to set up
  *
  * @return void
  */
 protected function setModelProperties(array $data)
 {
     parent::setModelProperties($data);
     if (in_array($this->currentAction, array('update', 'create')) && isset($data['drupal_roles']) && is_array($data['drupal_roles'])) {
         $this->getModelObject()->updateDrupalRoles($data['drupal_roles']);
     }
 }
 /**
  * Populate model object properties by the passed data
  *
  * @param array $data Data to set
  *
  * @return void
  */
 protected function setModelProperties(array $data)
 {
     $result = !\XLite\Core\Auth::comparePassword(\XLite\Core\Auth::getInstance()->getProfile()->getPassword(), $data['password']);
     if (!$result) {
         $formFields = $this->getFormFields();
         $this->addErrorMessage('password', 'The new password must not coincide with the current password for your account.', $formFields[self::SECTION_MAIN]);
     }
     parent::setModelProperties($data);
 }