56 $this->_sForgotEmail = $sEmail;
57 $oEmail =
oxNew(
'oxemail' );
62 $iSuccess = $oEmail->sendForgotPwdEmail( $sEmail );
64 if ( $iSuccess !==
true ) {
65 $sError = ($iSuccess ===
false)?
'ERROR_MESSAGE_PASSWORD_EMAIL_INVALID' :
'MESSAGE_NOT_ABLE_TO_SEND_EMAIL';
66 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay($sError,
false,
true);
67 $this->_sForgotEmail =
false;
82 $oUser =
oxNew(
'oxuser' );
83 if ( ( $oExcp = $oUser->checkPassword( $sNewPass, $sConfPass,
true ) ) ) {
84 switch ( $oExcp->getMessage() ) {
85 case 'ERROR_MESSAGE_INPUT_EMPTYPASS':
86 case 'ERROR_MESSAGE_PASSWORD_TOO_SHORT':
87 return oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_PASSWORD_TOO_SHORT',
false,
true);
89 return oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_PASSWORD_DO_NOT_MATCH',
false,
true);
94 if ( $oUser->loadUserByUpdateId( $this->getUpdateId() ) ) {
97 $oUser->setPassword( $sNewPass );
100 $oUser->setUpdateKey(
true );
107 return 'forgotpwd?success=1';
110 return oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_PASSWORD_LINK_EXPIRED',
false,
true );
152 $blExpired =
oxNew(
'oxuser' )->isExpiredUpdateId( $sKey );
179 $aPath[
'link'] = $this->
getLink();