Changeset 16030 for plugins/sfDoctrineGuardExtraPlugin
- Timestamp:
- 03/05/09 16:24:36 (4 years ago)
- Files:
-
- plugins/sfDoctrineGuardExtraPlugin/branches/1.1/modules/sfGuardForgotPassword/lib/BasesfGuardForgotPasswordActions.class.php (modified) (1 diff)
- plugins/sfDoctrineGuardExtraPlugin/branches/1.1/modules/sfGuardRegister/lib/BasesfGuardRegisterActions.class.php (modified) (1 diff)
- plugins/sfDoctrineGuardExtraPlugin/branches/1.2/modules/sfGuardForgotPassword/lib/BasesfGuardForgotPasswordActions.class.php (modified) (1 diff)
- plugins/sfDoctrineGuardExtraPlugin/branches/1.2/modules/sfGuardRegister/lib/BasesfGuardRegisterActions.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrineGuardExtraPlugin/branches/1.1/modules/sfGuardForgotPassword/lib/BasesfGuardForgotPasswordActions.class.php
r13284 r16030 94 94 $params = array($request->getParameter('key'), $request->getParameter('id')); 95 95 96 $query = new Doctrine_Query(); 97 $query->from('sfGuardUser u')->where('u.password = ? AND u.id = ?', $params)->limit(1); 96 $this->sfGuardUser = Doctrine_Query::create() 97 ->from('sfGuardUser u') 98 ->where('u.password = ? AND u.id = ?', $params) 99 ->limit(1) 100 ->fetchOne(); 98 101 99 $this->sfGuardUser = $query->execute()->getFirst(); 100 101 if ( ! $this->sfGuardUser) 102 { 103 $this->forward('sfGuardForgotPassword', 'invalid_key'); 104 } 102 $this->forwardUnless($this->sfGuardUser, 'sfGuardForgotPassword', 'invalid_key'); 105 103 106 104 $newPassword = time(); plugins/sfDoctrineGuardExtraPlugin/branches/1.1/modules/sfGuardRegister/lib/BasesfGuardRegisterActions.class.php
r12951 r16030 79 79 $params = array($request->getParameter('key'), $request->getParameter('id')); 80 80 81 $query = new Doctrine_Query(); 82 $query->from('sfGuardUser u')->where('u.password = ? AND u.id = ?', $params)->limit(1); 81 $sfGuardUser = Doctrine_Query::create() 82 ->from('sfGuardUser u') 83 ->where('u.password = ? AND u.id = ?', $params) 84 ->limit(1) 85 ->fetchOne(); 83 86 84 $sfGuardUser = $query->execute()->getFirst(); 87 $this->forward404Unless($sfGuardUser); 88 85 89 $sfGuardUser->setIsActive(1); 86 90 $sfGuardUser->save(); 87 88 $this->forward404Unless($sfGuardUser);89 91 90 92 $messageParams = array( plugins/sfDoctrineGuardExtraPlugin/branches/1.2/modules/sfGuardForgotPassword/lib/BasesfGuardForgotPasswordActions.class.php
r13284 r16030 94 94 $params = array($request->getParameter('key'), $request->getParameter('id')); 95 95 96 $query = new Doctrine_Query(); 97 $query->from('sfGuardUser u')->where('u.password = ? AND u.id = ?', $params)->limit(1); 96 $this->sfGuardUser = Doctrine_Query::create() 97 ->from('sfGuardUser u') 98 ->where('u.password = ? AND u.id = ?', $params) 99 ->limit(1) 100 ->fetchOne(); 98 101 99 $this->sfGuardUser = $query->execute()->getFirst(); 100 101 if ( ! $this->sfGuardUser) 102 { 103 $this->forward('sfGuardForgotPassword', 'invalid_key'); 104 } 102 $this->forwardUnless($this->sfGuardUser, 'sfGuardForgotPassword', 'invalid_key'); 105 103 106 104 $newPassword = time(); plugins/sfDoctrineGuardExtraPlugin/branches/1.2/modules/sfGuardRegister/lib/BasesfGuardRegisterActions.class.php
r12951 r16030 79 79 $params = array($request->getParameter('key'), $request->getParameter('id')); 80 80 81 $query = new Doctrine_Query(); 82 $query->from('sfGuardUser u')->where('u.password = ? AND u.id = ?', $params)->limit(1); 81 $sfGuardUser = Doctrine_Query::create() 82 ->from('sfGuardUser u') 83 ->where('u.password = ? AND u.id = ?', $params) 84 ->limit(1) 85 ->fetchOne(); 83 86 84 $sfGuardUser = $query->execute()->getFirst(); 87 $this->forward404Unless($sfGuardUser); 88 85 89 $sfGuardUser->setIsActive(1); 86 90 $sfGuardUser->save(); 87 88 $this->forward404Unless($sfGuardUser);89 91 90 92 $messageParams = array(