OD STYLE Formating workflow/engine/methods/login/

Change format files in workflow/engine/methods/login/
This commit is contained in:
norahmollo
2012-10-16 18:08:45 +00:00
parent c95a3f00b7
commit 8ebd27a064
9 changed files with 219 additions and 257 deletions

View File

@@ -154,9 +154,9 @@ try {
} }
if (PHP_VERSION < 5.2) { if (PHP_VERSION < 5.2) {
setcookie(session_name(), session_id(), null, '/', '; HttpOnly'); setcookie(session_name(), session_id(), null, '/', '; HttpOnly');
} else { } else {
setcookie(session_name(), session_id(), null, '/', null, null, true); setcookie(session_name(), session_id(), null, '/', null, null, true);
} }
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']); $aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
@@ -214,11 +214,11 @@ try {
//************** background processes, here we are putting some back office routines ********** //************** background processes, here we are putting some back office routines **********
$heartBeatNWIDate = $oServerConf->getHeartbeatProperty('HB_NEXT_GWI_DATE','HEART_BEAT_CONF'); $heartBeatNWIDate = $oServerConf->getHeartbeatProperty('HB_NEXT_GWI_DATE','HEART_BEAT_CONF');
if (is_null($heartBeatNWIDate)) { if (is_null($heartBeatNWIDate)) {
$heartBeatNWIDate = time(); $heartBeatNWIDate = time();
} }
if (time() >= $heartBeatNWIDate) { if (time() >= $heartBeatNWIDate) {
$oServerConf->setWsInfo(SYS_SYS, $oServerConf->getWorkspaceInfo(SYS_SYS)); $oServerConf->setWsInfo(SYS_SYS, $oServerConf->getWorkspaceInfo(SYS_SYS));
$oServerConf->setHeartbeatProperty('HB_NEXT_GWI_DATE', strtotime('+1 day'), 'HEART_BEAT_CONF'); $oServerConf->setHeartbeatProperty('HB_NEXT_GWI_DATE', strtotime('+1 day'), 'HEART_BEAT_CONF');
} }
//**** defining and saving server info, this file has the values of the global array $_SERVER **** //**** defining and saving server info, this file has the values of the global array $_SERVER ****

View File

@@ -24,63 +24,62 @@ require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties(); $oUserProperty = new UsersProperties();
$aUserProperty = $oUserProperty->load($_SESSION['USER_LOGGED']); $aUserProperty = $oUserProperty->load($_SESSION['USER_LOGGED']);
$aHistory = unserialize($aUserProperty['USR_PASSWORD_HISTORY']); $aHistory = unserialize($aUserProperty['USR_PASSWORD_HISTORY']);
if (!is_array($aHistory)) { if (!is_array($aHistory)) {
$aHistory = array(); $aHistory = array();
} }
if (!defined('PPP_PASSWORD_HISTORY')) { if (!defined('PPP_PASSWORD_HISTORY')) {
define('PPP_PASSWORD_HISTORY', 0); define('PPP_PASSWORD_HISTORY', 0);
} }
if (PPP_PASSWORD_HISTORY > 0) { if (PPP_PASSWORD_HISTORY > 0) {
if (count($aHistory) >= PPP_PASSWORD_HISTORY) { if (count($aHistory) >= PPP_PASSWORD_HISTORY) {
array_shift($aHistory); array_shift($aHistory);
} }
$aHistory[] = $_POST['form']['USR_PASSWORD']; $aHistory[] = $_POST['form']['USR_PASSWORD'];
} }
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s'); $aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
$aUserProperty['USR_LOGGED_NEXT_TIME'] = 0; $aUserProperty['USR_LOGGED_NEXT_TIME'] = 0;
$aUserProperty['USR_PASSWORD_HISTORY'] = serialize($aHistory); $aUserProperty['USR_PASSWORD_HISTORY'] = serialize($aHistory);
$oUserProperty->update($aUserProperty); $oUserProperty->update($aUserProperty);
if ( class_exists('redirectDetail')) {
//falta validar...
if(isset($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']))
$userRole = $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
$oPluginRegistry = &PMPluginRegistry::getSingleton(); if (class_exists('redirectDetail')) {
//$oPluginRegistry->showArrays(); //falta validar...
$aRedirectLogin = $oPluginRegistry->getRedirectLogins(); if (isset($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'])) {
if(isset($aRedirectLogin)) $userRole = $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
{ if(is_array($aRedirectLogin)) }
{ $oPluginRegistry = &PMPluginRegistry::getSingleton();
foreach ( $aRedirectLogin as $key=>$detail ) { //$oPluginRegistry->showArrays();
if(isset($detail->sPathMethod)) $aRedirectLogin = $oPluginRegistry->getRedirectLogins();
{ if (isset($aRedirectLogin)) {
if ( $detail->sRoleCode == $userRole ) { if (is_array($aRedirectLogin)) {
G::header('location: /sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $detail->sPathMethod ); foreach ($aRedirectLogin as $key => $detail) {
die; if (isset($detail->sPathMethod)) {
} if ($detail->sRoleCode == $userRole) {
G::header('location: /sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $detail->sPathMethod );
die;
}
}
} }
} }
} }
}
} }
//end plugin //end plugin
if (isset($frm['USER_LANG'])) {
if (isset($frm['USER_LANG'])) {
if ($frm['USER_LANG'] != '') { if ($frm['USER_LANG'] != '') {
$lang = $frm['USER_LANG']; $lang = $frm['USER_LANG'];
} }
} } else {
else {
if (defined('SYS_LANG')) { if (defined('SYS_LANG')) {
$lang = SYS_LANG; $lang = SYS_LANG;
} else {
$lang = 'en';
} }
else { }
$lang = 'en'; $sLocation = $oUserProperty->redirectTo($_SESSION['USER_LOGGED'], $lang);
} G::header('Location: ' . $sLocation);
} die;
$sLocation = $oUserProperty->redirectTo($_SESSION['USER_LOGGED'], $lang);
G::header('Location: ' . $sLocation);
die;
?>

View File

@@ -24,82 +24,78 @@
* *
*/ */
function lookup( $target ) { function lookup ($target)
global $ntarget; {
$msg = $target . ' => '; global $ntarget;
//if (eregi ( '[a-zA-Z]', $target )) $msg = $target . ' => ';
if (preg_match( '[a-zA-Z]', $target )) //Made compatible to PHP 5.3 //if (eregi ( '[a-zA-Z]', $target ))
$ntarget = gethostbyname ( $target ); if (preg_match( '[a-zA-Z]', $target )) {
else //Made compatible to PHP 5.3
$ntarget = gethostbyaddr ( $target ); $ntarget = gethostbyname ( $target );
$msg .= $ntarget; } else {
return ($msg); $ntarget = gethostbyaddr ( $target );
}
$msg .= $ntarget;
return ($msg);
} }
G::LoadClass("system"); G::LoadClass("system");
if (getenv ( 'HTTP_CLIENT_IP' )) { if (getenv ( 'HTTP_CLIENT_IP' )) {
$ip = getenv ( 'HTTP_CLIENT_IP' ); $ip = getenv ( 'HTTP_CLIENT_IP' );
} } else {
else { if (getenv ( 'HTTP_X_FORWARDED_FOR' )) {
if (getenv ( 'HTTP_X_FORWARDED_FOR' )) { $ip = getenv ( 'HTTP_X_FORWARDED_FOR' );
$ip = getenv ( 'HTTP_X_FORWARDED_FOR' ); } else {
} $ip = getenv ( 'REMOTE_ADDR' );
else { }
$ip = getenv ( 'REMOTE_ADDR' );
}
} }
$redhat = ''; $redhat = '';
if (file_exists ( '/etc/redhat-release' )) { if (file_exists ( '/etc/redhat-release' )) {
$fnewsize = filesize ( '/etc/redhat-release' ); $fnewsize = filesize ( '/etc/redhat-release' );
$fp = fopen ( '/etc/redhat-release', 'r' ); $fp = fopen ( '/etc/redhat-release', 'r' );
$redhat = trim ( fread ( $fp, $fnewsize ) ); $redhat = trim ( fread ( $fp, $fnewsize ) );
fclose ( $fp ); fclose ( $fp );
} }
$redhat .= " (" . PHP_OS . ")"; $redhat .= " (" . PHP_OS . ")";
if (defined ( "DB_HOST" )) { if (defined ( "DB_HOST" )) {
G::LoadClass ( 'net' ); G::LoadClass ( 'net' );
G::LoadClass ( 'dbConnections' ); G::LoadClass ( 'dbConnections' );
$dbNetView = new NET ( DB_HOST ); $dbNetView = new NET ( DB_HOST );
$dbNetView->loginDbServer ( DB_USER, DB_PASS ); $dbNetView->loginDbServer ( DB_USER, DB_PASS );
$dbConns = new dbConnections ( '' );
$dbConns = new dbConnections ( '' ); $availdb = '';
$availdb = ''; foreach ($dbConns->getDbServicesAvailables () as $key => $val) {
foreach ( $dbConns->getDbServicesAvailables () as $key => $val ) { if ($availdb != '') {
if ($availdb != '') $availdb .= ', ';
$availdb .= ', '; }
$availdb .= $val ['name']; $availdb .= $val ['name'];
} }
try {
try { $sMySQLVersion = $dbNetView->getDbServerVersion ( DB_ADAPTER );
} catch (Exception $oException) {
$sMySQLVersion = $dbNetView->getDbServerVersion ( DB_ADAPTER ); $sMySQLVersion = '?????';
}
}
catch ( Exception $oException ) {
$sMySQLVersion = '?????';
}
} }
$Fields ['SYSTEM'] = $redhat; $Fields ['SYSTEM'] = $redhat;
if (defined ( "DB_HOST" )) { if (defined ( "DB_HOST" )) {
$Fields ['DATABASE'] = $dbNetView->dbName ( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')'; $Fields ['DATABASE'] = $dbNetView->dbName ( DB_ADAPTER ) . ' (Version ' . $sMySQLVersion . ')';
$Fields ['DATABASE_SERVER'] = DB_HOST; $Fields ['DATABASE_SERVER'] = DB_HOST;
$Fields ['DATABASE_NAME'] = DB_NAME; $Fields ['DATABASE_NAME'] = DB_NAME;
$Fields ['AVAILABLE_DB'] = $availdb; $Fields ['AVAILABLE_DB'] = $availdb;
} } else {
else { $Fields ['DATABASE'] = "Not defined";
$Fields ['DATABASE'] = "Not defined"; $Fields ['DATABASE_SERVER'] = "Not defined";
$Fields ['DATABASE_SERVER'] = "Not defined"; $Fields ['DATABASE_NAME'] = "Not defined";
$Fields ['DATABASE_NAME'] = "Not defined"; $Fields ['AVAILABLE_DB'] = "Not defined";
$Fields ['AVAILABLE_DB'] = "Not defined";
} }
$eeT=""; $eeT="";
if(class_exists('pmLicenseManager')){ if (class_exists('pmLicenseManager')) {
$eeT=" - Enterprise Edition"; $eeT=" - Enterprise Edition";
} }
$Fields ['PHP'] = phpversion (); $Fields ['PHP'] = phpversion ();
$Fields ['FLUID'] = System::getVersion() . $eeT; $Fields ['FLUID'] = System::getVersion() . $eeT;
$Fields ['IP'] = lookup ( $ip ); $Fields ['IP'] = lookup ( $ip );
@@ -113,8 +109,9 @@ $Fields ['SERVER_ADDR'] = getenv ( 'SERVER_ADDR' );
$Fields ['HTTP_USER_AGENT'] = getenv ( 'HTTP_USER_AGENT' ); $Fields ['HTTP_USER_AGENT'] = getenv ( 'HTTP_USER_AGENT' );
$Fields ['TIME_ZONE'] = (defined('TIME_ZONE')) ? TIME_ZONE : "Unknown"; $Fields ['TIME_ZONE'] = (defined('TIME_ZONE')) ? TIME_ZONE : "Unknown";
if (! defined ( 'SKIP_RENDER_SYSTEM_INFORMATION' )) { if (!defined( 'SKIP_RENDER_SYSTEM_INFORMATION')) {
$G_PUBLISH = new Publisher ( ); $G_PUBLISH = new Publisher ( );
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/dbInfo', '', $Fields, 'appNew2' ); $G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/dbInfo', '', $Fields, 'appNew2' );
G::RenderPage ( 'publish', 'raw' ); G::RenderPage ( 'publish', 'raw' );
} }

View File

@@ -22,7 +22,7 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
* *
*/ */
$G_PUBLISH = new Publisher (); $G_PUBLISH = new Publisher ();
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/forgotPassword', '', array(), 'retrivePassword.php'); $G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/forgotPassword', '', array(), 'retrivePassword.php');
G::RenderPage ( "publish" ); G::RenderPage ( "publish" );

View File

@@ -22,7 +22,7 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
* *
*/ */
$newFile = str_replace ( 'index.php', 'login.php' , __FILE__ ) ; $newFile = str_replace ( 'index.php', 'login.php' , __FILE__ );
return $newFile; return $newFile;

View File

@@ -23,28 +23,25 @@
* *
*/ */
try { try {
G::LoadInclude ( 'ajax' );
G::LoadInclude ( 'ajax' ); if (isset ( $_POST ['form'] )) {
if (isset ( $_POST ['form'] )) { $_POST = $_POST ['form'];
$_POST = $_POST ['form']; }
} $_POST ['function'] = get_ajax_value ( 'function' );
$_POST ['function'] = get_ajax_value ( 'function' ); switch ($_POST ['function']) {
switch ($_POST ['function']) { case 'getStarted_save':
case 'getStarted_save' : require_once 'classes/model/Configuration.php';
require_once 'classes/model/Configuration.php'; $aData ['CFG_UID'] = 'getStarted';
$aData ['CFG_UID'] = 'getStarted'; $aData ['OBJ_UID'] = '';
$aData ['OBJ_UID'] = ''; $aData ['CFG_VALUE'] = '1';
$aData ['CFG_VALUE'] = '1'; $aData ['PRO_UID'] = '';
$aData ['PRO_UID'] = ''; $aData ['USR_UID'] = '';
$aData ['USR_UID'] = ''; $aData ['APP_UID'] = '';
$aData ['APP_UID'] = ''; $oConfig = new Configuration ( );
$oConfig->create ( $aData );
$oConfig = new Configuration ( ); break;
}
$oConfig->create ( $aData ); } catch ( Exception $oException ) {
break; die ( $oException->getMessage () );
}
}
catch ( Exception $oException ) {
die ( $oException->getMessage () );
} }

View File

@@ -30,7 +30,7 @@ $G_SUB_MENU = "empty";
$referer = $_SERVER ['HTTP_REFERER']; $referer = $_SERVER ['HTTP_REFERER'];
$dbc = new DBConnection ( ); $dbc = new DBConnection ( );
$G_PUBLISH = new Publisher ( ); $G_PUBLISH = new Publisher ( );
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "login/noViewPage", "", NULL ); $G_PUBLISH->AddContent ( "xmlform", "xmlform", "login/noViewPage", "", null );
G::RenderPage ( "publish" ); G::RenderPage ( "publish" );
?>

View File

@@ -11,40 +11,40 @@ $user = new Users();
$userData = $rbacUser->getByUsername($data['USR_USERNAME']); $userData = $rbacUser->getByUsername($data['USR_USERNAME']);
if($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']) { if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']) {
$aSetup = getEmailConfiguration(); $aSetup = getEmailConfiguration();
if (count($aSetup) == 0 || !isset($aSetup['MESS_ENGINE'])) { if (count($aSetup) == 0 || !isset($aSetup['MESS_ENGINE'])) {
G::SendTemporalMessage ('ID_EMAIL_ENGINE_IS_NOT_ENABLED', "warning"); G::SendTemporalMessage ('ID_EMAIL_ENGINE_IS_NOT_ENABLED', "warning");
G::header('location: forgotPassword'); G::header('location: forgotPassword');
die; die;
} }
$newPass = G::generate_password(); $newPass = G::generate_password();
$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 /* **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>';
$msg .='<p>'.G::LoadTranslation('ID_YOUR_USERMANE_IS').' : <strong>'.$userData['USR_USERNAME'].'</strong></p>'; $msg .='<p>'.G::LoadTranslation('ID_YOUR_USERMANE_IS').' : <strong>'.$userData['USR_USERNAME'].'</strong></p>';
$msg .='<p>'.G::LoadTranslation('ID_YOUR_PASSWORD_IS').' : <strong>'.$newPass.'</strong></p>'; $msg .='<p>'.G::LoadTranslation('ID_YOUR_PASSWORD_IS').' : <strong>'.$newPass.'</strong></p>';
switch ($aSetup['MESS_ENGINE']) { switch ($aSetup['MESS_ENGINE']) {
case 'MAIL': case 'MAIL':
$engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_1'); $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_1');
break; break;
case 'PHPMAILER': case 'PHPMAILER':
$engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_2'); $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_2');
break; break;
case 'OPENMAIL': case 'OPENMAIL':
$engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_3'); $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_3');
break; break;
} }
$sBody = " $sBody = "
<table style=\"background-color: white; font-family: Arial,Helvetica,sans-serif; color: black; font-size: 11px; text-align: left;\" cellpadding='10' cellspacing='0' width='100%'> <table style=\"background-color: white; font-family: Arial,Helvetica,sans-serif; color: black; font-size: 11px; text-align: left;\" cellpadding='10' cellspacing='0' width='100%'>
<tbody><tr><td><img id='logo' src='http://".$_SERVER['SERVER_NAME']."/images/processmaker.logo.jpg' /></td></tr> <tbody><tr><td><img id='logo' src='http://".$_SERVER['SERVER_NAME']."/images/processmaker.logo.jpg' /></td></tr>
<tr><td style='font-size: 14px;'>$msg</td></tr> <tr><td style='font-size: 14px;'>$msg</td></tr>
@@ -53,99 +53,66 @@ if($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL']
<a href='http://www.processmaker.com' style='color:#c40000;'>www.processmaker.com</a><br /></td> <a href='http://www.processmaker.com' style='color:#c40000;'>www.processmaker.com</a><br /></td>
</tr></tbody></table>"; </tr></tbody></table>";
G::LoadClass('spool'); G::LoadClass('spool');
$oSpool = new spoolRun(); $oSpool = new spoolRun();
$oSpool->setConfig( array( $oSpool->setConfig( array(
'MESS_ENGINE' => $aSetup['MESS_ENGINE'], 'MESS_ENGINE' => $aSetup['MESS_ENGINE'],
'MESS_SERVER' => $aSetup['MESS_SERVER'], 'MESS_SERVER' => $aSetup['MESS_SERVER'],
'MESS_PORT' => $aSetup['MESS_PORT'], 'MESS_PORT' => $aSetup['MESS_PORT'],
'MESS_ACCOUNT' => $aSetup['MESS_ACCOUNT'], 'MESS_ACCOUNT' => $aSetup['MESS_ACCOUNT'],
'MESS_PASSWORD' => $aSetup['MESS_PASSWORD'], 'MESS_PASSWORD' => $aSetup['MESS_PASSWORD'],
'SMTPAuth' => $aSetup['MESS_RAUTH'], 'SMTPAuth' => $aSetup['MESS_RAUTH'],
'SMTPSecure' => $aSetup['SMTPSecure'] 'SMTPSecure' => $aSetup['SMTPSecure']
)); ));
$passwd = $oSpool->config['MESS_PASSWORD']; $passwd = $oSpool->config['MESS_PASSWORD'];
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT'); $passwdDec = G::decrypt($passwd,'EMAILENCRYPT');
$auxPass = explode('hash:', $passwdDec); $auxPass = explode('hash:', $passwdDec);
if (count($auxPass) > 1) { if (count($auxPass) > 1) {
if (count($auxPass) == 2) { if (count($auxPass) == 2) {
$passwd = $auxPass[1]; $passwd = $auxPass[1];
} else { } else {
array_shift($auxPass); array_shift($auxPass);
$passwd = implode('', $auxPass); $passwd = implode('', $auxPass);
}
} }
}
$oSpool->config['MESS_PASSWORD'] = $passwd;
$oSpool->create(array( $oSpool->config['MESS_PASSWORD'] = $passwd;
'msg_uid' => '',
'app_uid' => '',
'del_index' => 0,
'app_msg_type' => 'TEST',
'app_msg_subject' => $sSubject,
'app_msg_from' => $sFrom,
'app_msg_to' => $data['USR_EMAIL'],
'app_msg_body' => $sBody,
'app_msg_cc' => '',
'app_msg_bcc' => '',
'app_msg_attach' => '',
'app_msg_template' => '',
'app_msg_status' => 'pending',
'app_msg_attach'=>''
));
try { $oSpool->create(array(
'msg_uid' => '',
$oSpool->sendMail(); 'app_uid' => '',
'del_index' => 0,
$rbacUser->update($aData); 'app_msg_type' => 'TEST',
$user->update($aData); 'app_msg_subject' => $sSubject,
'app_msg_from' => $sFrom,
G::header ("location: login.html"); 'app_msg_to' => $data['USR_EMAIL'],
G::SendTemporalMessage ('ID_NEW_PASSWORD_SENT', "info"); 'app_msg_body' => $sBody,
} 'app_msg_cc' => '',
catch (phpmailerException $e) { 'app_msg_bcc' => '',
G::header ("location: login.html"); 'app_msg_attach' => '',
G::SendTemporalMessage (G::LoadTranslation('MISSING_OR_NOT_CONFIGURED_SMTP'), "warning", 'string'); 'app_msg_template' => '',
} 'app_msg_status' => 'pending',
catch (Exception $e) { 'app_msg_attach'=>''
G::header ("location: login.html"); ));
G::SendTemporalMessage ($e->getMessage(), "warning", 'string');
}
try {
$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');
G::header('location: forgotPassword'); G::header('location: forgotPassword');
} }

View File

@@ -23,9 +23,11 @@
* *
*/ */
if (! isset ( $_POST )) if (! isset ( $_POST )) {
G::header ( 'location: /sys/' . $lang . '/' . SYS_SKIN . '/' . 'login/login' ); G::header ( 'location: /sys/' . $lang . '/' . SYS_SKIN . '/' . 'login/login' );
}
if (isset ( $_SESSION ['sysLogin'] )) {
$_POST ['form'] = $_SESSION ['sysLogin'];
}
require_once ('authentication.php');
if (isset ( $_SESSION ['sysLogin'] ))
$_POST ['form'] = $_SESSION ['sysLogin'];
require_once ('authentication.php');