public function execute(&$value, &$error)
 {
     sfPropelApprovableBehavior::disable();
     if (sfGuardUserPeer::retrieveByUsername($value) != null) {
         $error = $this->getParameter('user_unique_error', "*This email is already registered with us. Did you need to <strong>reset your password</strong>?");
         return false;
     }
     return true;
 }
 public function execute(&$value, &$error)
 {
     sfPropelApprovableBehavior::disable();
     if (sfGuardUserPeer::retrieveByUsername($value) == false) {
         $error = $this->getParameter('user_error');
         $error = "Sorry, couldn't find {$value} in our records - probably means no one signed up using this name.";
         return false;
     }
     return true;
 }
Esempio n. 3
0
 public function executeForgotPasswordText()
 {
     sfPropelApprovableBehavior::disable();
     $this->user = sfGuardUserProfilePeer::retrieveByUuid($this->getRequest()->getAttribute('user_id'));
     sfPropelApprovableBehavior::disable();
     $this->token = $this->user->getsfGuardUser()->getToken();
     $this->user = $this->user->getUuid();
 }
Esempio n. 4
0
 public function handleErrorResetPassword()
 {
     sfPropelApprovableBehavior::disable();
     $this->forward404Unless($profile = sfGuardUserProfilePeer::retrieveByUuid($this->getRequestParameter('user')), 'Unable to set profile, cannot continue to reset password');
     sfPropelApprovableBehavior::disable();
     $this->forward404Unless($user = $profile->getsfGuardUser(), 'User not found, unable to reset password');
     $this->token = $this->getRequestParameter('token');
     $this->forward404Unless($this->token == $profile->getToken(), 'Tokens do not match, unable to reset password: [' . $this->token . ']:[' . $profile->getToken() . '] for ' . $profile->getFullName());
     $this->user = $user;
     $this->profile = $profile;
     return sfView::SUCCESS;
 }
Esempio n. 5
0
 public function getRelatedObject()
 {
     sfPropelApprovableBehavior::disable();
     $peer = $this->getApprovableModel() . 'Peer';
     return call_user_func(array($peer, 'retrieveByPK'), $this->getApprovableId());
 }
 public static function disable()
 {
     self::$active = false;
 }