BUG 8829 PM 2.0 testing 16 Forgot Password genera un Fatal Error SOLVED.

- En la version de PM 2.0 testing 16 cuando se habilita la opcion de forgot password y este despliega un mensaje de fatal error.
- Correción en el mensaje de respuesta de error.
This commit is contained in:
Hector Cortez
2012-03-28 15:52:25 -04:00
parent 9cd2aa97a0
commit 53689d53c1

View File

@@ -23,10 +23,10 @@ if($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']
$aData['USR_UID'] = $userData['USR_UID']; $aData['USR_UID'] = $userData['USR_UID'];
$aData['USR_PASSWORD'] = md5($newPass); $aData['USR_PASSWORD'] = md5($newPass);
/* **Save after sending the mail
$rbacUser->update($aData); $rbacUser->update($aData);
$user->update($aData); $user->update($aData);
*/
$sFrom = ($aSetup['MESS_ACCOUNT'] != '' ? $aSetup['MESS_ACCOUNT'] . ' ' : '') . '<' . $aSetup['MESS_ACCOUNT'] . '>'; $sFrom = ($aSetup['MESS_ACCOUNT'] != '' ? $aSetup['MESS_ACCOUNT'] . ' ' : '') . '<' . $aSetup['MESS_ACCOUNT'] . '>';
$sSubject = G::LoadTranslation('ID_RESET_PASSWORD').' - ProcessMaker' ; $sSubject = G::LoadTranslation('ID_RESET_PASSWORD').' - ProcessMaker' ;
$msg = '<h3>ProcessMaker Forgot password Service</h3>'; $msg = '<h3>ProcessMaker Forgot password Service</h3>';
@@ -65,13 +65,7 @@ if($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']
'SMTPAuth' => $aSetup['MESS_RAUTH'], 'SMTPAuth' => $aSetup['MESS_RAUTH'],
'SMTPSecure' => $aSetup['SMTPSecure'] 'SMTPSecure' => $aSetup['SMTPSecure']
)); ));
$passwd = $oSpool['MESS_PASSWORD'];
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT');
if (strpos( $passwdDec, 'hash:' ) !== false) {
list($hash, $pass) = explode(":", $passwdDec);
$oSpool['MESS_PASSWORD'] = $pass;
}
$oSpool->create(array( $oSpool->create(array(
'msg_uid' => '', 'msg_uid' => '',
'app_uid' => '', 'app_uid' => '',
@@ -89,9 +83,25 @@ if($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']
'app_msg_attach'=>'' 'app_msg_attach'=>''
)); ));
$oSpool->sendMail(); try {
G::header ("location: login.html");
G::SendTemporalMessage ('ID_NEW_PASSWORD_SENT', "info"); $oSpool->sendMail();
$rbacUser->update($aData);
$user->update($aData);
G::header ("location: login.html");
G::SendTemporalMessage ('ID_NEW_PASSWORD_SENT', "info");
}
catch (phpmailerException $e) {
G::header ("location: login.html");
G::SendTemporalMessage (G::LoadTranslation('MISSING_OR_NOT_CONFIGURED_SMTP'), "warning", 'string');
}
catch (Exception $e) {
G::header ("location: login.html");
G::SendTemporalMessage ($e->getMessage(), "warning", 'string');
}
} else { } else {
$msg = G::LoadTranslation('ID_USER') . ' ' . $data['USR_USERNAME'] . ' '. G::LoadTranslation('ID_IS_NOT_REGISTERED'); $msg = G::LoadTranslation('ID_USER') . ' ' . $data['USR_USERNAME'] . ' '. G::LoadTranslation('ID_IS_NOT_REGISTERED');
G::SendTemporalMessage ($msg, "warning", 'string'); G::SendTemporalMessage ($msg, "warning", 'string');