Merged in bugfix/PMC-183 (pull request #6718)
PMC-183 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -317,12 +317,14 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$userPropertyInfo = $userProperty->loadOrCreateIfNotExists($_SESSION['USER_LOGGED'], array('USR_PASSWORD_HISTORY' => serialize(array(G::encryptOld($pwd)))));
|
$userPropertyInfo = $userProperty->loadOrCreateIfNotExists($_SESSION['USER_LOGGED'], array('USR_PASSWORD_HISTORY' => serialize(array(G::encryptOld($pwd)))));
|
||||||
|
//Get the errors in the password
|
||||||
$errorInPassword = $userProperty->validatePassword(
|
$errorInPassword = $userProperty->validatePassword(
|
||||||
$_POST['form']['USR_PASSWORD'],
|
$_POST['form']['USR_PASSWORD'],
|
||||||
$userPropertyInfo['USR_LAST_UPDATE_DATE'],
|
$userPropertyInfo['USR_LAST_UPDATE_DATE'],
|
||||||
$userPropertyInfo['USR_LOGGED_NEXT_TIME']
|
$userPropertyInfo['USR_LOGGED_NEXT_TIME']
|
||||||
);
|
);
|
||||||
|
//Get the policies enabled
|
||||||
|
$policiesInPassword = $userProperty->validatePassword('', date('Y-m-d'), $userPropertyInfo['USR_LOGGED_NEXT_TIME'], true);
|
||||||
//Enable change password from GAP
|
//Enable change password from GAP
|
||||||
if (!isset($enableChangePasswordAfterNextLogin)) {
|
if (!isset($enableChangePasswordAfterNextLogin)) {
|
||||||
$enableChangePasswordAfterNextLogin = true;
|
$enableChangePasswordAfterNextLogin = true;
|
||||||
@@ -333,14 +335,13 @@ try {
|
|||||||
define('NO_DISPLAY_USERNAME', 1);
|
define('NO_DISPLAY_USERNAME', 1);
|
||||||
}
|
}
|
||||||
//We will to get the message for the login
|
//We will to get the message for the login
|
||||||
$messPassword = [];
|
$messPassword = $policySection = $userProperty->getMessageValidatePassword($policiesInPassword, false);
|
||||||
$policySection = $userProperty->getMessageValidatePassword($errorInPassword, false);
|
|
||||||
$changePassword = '<span style="font-weight:normal;">';
|
$changePassword = '<span style="font-weight:normal;">';
|
||||||
if (array_search('ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN', $errorInPassword)) {
|
if (array_search('ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN', $errorInPassword)) {
|
||||||
$changePassword .= G::LoadTranslation('ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN') . '<br/><br/>';
|
$changePassword .= G::LoadTranslation('ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN') . '<br/><br/>';
|
||||||
}
|
}
|
||||||
$messPassword['DESCRIPTION'] = $changePassword . $policySection['DESCRIPTION'] . '</span>';
|
|
||||||
|
|
||||||
|
$messPassword['DESCRIPTION'] = $changePassword . $policySection['DESCRIPTION'] . '</span>';
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user