Author: Damian Suarez / Laura Melo
Inheritance: extends BaseFormDoctrine
 public function save($con = null)
 {
     if (strlen($this->values['new_password'])) {
         $this->getOption('user')->setPassword($this->values['new_password']);
     }
     parent::save($con);
 }
 /**
  * Save identity settings.
  */
 function execute($request)
 {
     $user = $request->getUser();
     $user->setSalutation($this->getData('salutation'));
     $user->setFirstName($this->getData('firstName'));
     $user->setMiddleName($this->getData('middleName'));
     $user->setInitials($this->getData('initials'));
     $user->setLastName($this->getData('lastName'));
     $user->setSuffix($this->getData('suffix'));
     $user->setGender($this->getData('gender'));
     parent::execute($request, $user);
 }
 /**
  * Save roles settings.
  * @param $request PKPRequest
  */
 function execute($request)
 {
     $user = $request->getUser();
     // Save the roles
     import('lib.pkp.classes.user.form.UserFormHelper');
     $userFormHelper = new UserFormHelper();
     $userFormHelper->saveRoleContent($this, $user);
     // Insert the user interests
     import('lib.pkp.classes.user.InterestManager');
     $interestManager = new InterestManager();
     $interestManager->setInterestsForUser($user, $this->getData('interests'));
     parent::execute($request, $user);
 }
 public function save($con = null)
 {
     $profile = parent::save($con);
     $values = $this->getValues();
     if ($values['form_type'] === 'date') {
         if (!$profile->getProfileOption()->count()) {
             $dateField = array('year', 'month', 'day');
             foreach ($dateField as $k => $field) {
                 $profileOption = new ProfileOption();
                 $profileOption->setSortOrder($k);
                 $profileOption->setProfile($profile);
                 $profileOption->save();
             }
         }
     }
 }
 public function save($con = null)
 {
     $profile = parent::save($con);
     $values = $this->getValues();
     if (!$values['is_edit_public_flag']) {
         Doctrine_Query::create()->update('MemberProfile')->set('public_flag', $values['default_public_flag'])->where('lft = 1')->andWhere('profile_id = ?', $profile->getId())->execute();
     }
     if ($values['form_type'] === 'date') {
         if (!$profile->getProfileOption()->count()) {
             $dateField = array('year', 'month', 'day');
             foreach ($dateField as $k => $field) {
                 $profileOption = new ProfileOption();
                 $profileOption->setSortOrder($k);
                 $profileOption->setProfile($profile);
                 $profileOption->save();
             }
         }
     }
 }
 /**
  * Save contact settings.
  * @param $request PKPRequest
  */
 function execute($request)
 {
     $user = $this->getUser();
     $user->setCountry($this->getData('country'));
     $user->setEmail($this->getData('email'));
     $user->setPhone($this->getData('phone'));
     $user->setMailingAddress($this->getData('mailingAddress'));
     $user->setAffiliation($this->getData('affiliation'), null);
     // Localized
     $site = $request->getSite();
     $availableLocales = $site->getSupportedLocales();
     $locales = array();
     foreach ($this->getData('userLocales') as $locale) {
         if (AppLocale::isLocaleValid($locale) && in_array($locale, $availableLocales)) {
             array_push($locales, $locale);
         }
     }
     $user->setLocales($locales);
     parent::execute($request, $user);
 }
 /**
  * Save public profile settings.
  * @param $request PKPRequest
  */
 function execute($request)
 {
     $user = $request->getUser();
     $user->setOrcid($this->getData('orcid'));
     $user->setUrl($this->getData('userUrl'));
     $user->setBiography($this->getData('biography'), null);
     // Localized
     parent::execute($request, $user);
 }