Esempio n. 1
0
 /**
  * Constructor.
  * @param $user PKPUser
  */
 function ProfileForm($user)
 {
     parent::PKPProfileForm('user/profile.tpl', $user);
     // Validation checks for this form
     $this->addCheck(new FormValidator($this, 'firstName', 'required', 'user.profile.form.firstNameRequired'));
     $this->addCheck(new FormValidator($this, 'lastName', 'required', 'user.profile.form.lastNameRequired'));
     $this->addCheck(new FormValidatorUrl($this, 'userUrl', 'optional', 'user.profile.form.urlInvalid'));
     $this->addCheck(new FormValidatorEmail($this, 'email', 'required', 'user.profile.form.emailRequired'));
     $this->addCheck(new FormValidator($this, 'affiliation', 'required', 'user.profile.form.affiliationRequired'));
     $this->addCheck(new FormValidatorCustom($this, 'email', 'required', 'user.account.form.emailExists', array(DAORegistry::getDAO('UserDAO'), 'userExistsByEmail'), array($user->getId(), true), true));
     $this->addCheck(new FormValidatorPost($this));
 }
Esempio n. 2
0
 /**
  * Constructor.
  */
 function ProfileForm($user)
 {
     parent::PKPProfileForm('user/profile.tpl', $user);
 }
 /**
  * Constructor.
  */
 function ProfileForm($user)
 {
     parent::PKPProfileForm($user);
 }