| [ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/summary/action/summaryaction.class.php" ); 4 lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" ); 5 lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" ); 6 lt_include( PLOG_CLASS_PATH."class/summary/data/summarytools.class.php" ); 7 8 /** 9 * verifys that the request to reset the password is ok and if so, shows the form where the user 10 * can type a new password 11 */ 12 class SummarySetNewPassword extends SummaryAction 13 { 14 15 var $_userNameHash; 16 var $_requestHash; 17 18 function SummarySetNewPassword( $actionInfo, $request ) 19 { 20 $this->SummaryAction( $actionInfo, $request ); 21 } 22 23 function validate() 24 { 25 $this->_userNameHash = $this->_request->getValue( "b" ); 26 $this->_requestHash = $this->_request->getValue( "a" ); 27 28 // check that the parameters are there... 29 $val = new StringValidator(); 30 if( !$val->validate( $this->_userNameHash ) || !$val->validate( $this->_requestHash )) { 31 $this->_view = new SummaryView( "summaryerror" ); 32 $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_request" )); 33 return false; 34 } 35 36 return true; 37 } 38 39 function perform() 40 { 41 // make sure that the request is correct 42 $userInfo = SummaryTools::verifyRequest( $this->_userNameHash, $this->_requestHash ); 43 if( !$userInfo ) { 44 $this->_view = new SummaryView( "summaryerror" ); 45 $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_request" )); 46 return false; 47 } 48 49 // so if everything went fine, we can now show a form to allow the user to finally 50 // set a new password... 51 $this->_view = new SummaryView( "changepassword" ); 52 $this->_view->setValue( "a", $this->_requestHash ); 53 $this->_view->setValue( "b", $this->_userNameHash ); 54 $this->_view->setValue( "userId", $userInfo->getId()); 55 $this->setCommonData(); 56 57 return true; 58 } 59 } 60 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
|