Merged in release/3.3 (pull request #6651)
HOR-4907 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -77,10 +77,6 @@ class MonologProvider
|
||||
*/
|
||||
public function __construct($channel, $fileLog, $readLoggingLevel = true)
|
||||
{
|
||||
//Set the minimum levelDebug that will be saved
|
||||
$levelDebug = $this->defineLevelDebug($readLoggingLevel);
|
||||
$this->setLevelDebug($levelDebug);
|
||||
|
||||
//Set path where the file will be saved
|
||||
$pathFile = $this->definePathFile();
|
||||
$this->setPathFile($pathFile);
|
||||
@@ -98,7 +94,8 @@ class MonologProvider
|
||||
$this->setFilePermission($permissionFile);
|
||||
|
||||
$this->setFormatter();
|
||||
$this->setConfig($channel, $fileLog);
|
||||
//Set the config: channel, fileLog and levelDebug that will be saved
|
||||
$this->setConfig($channel, $fileLog, $readLoggingLevel);
|
||||
|
||||
$this->testWriteLog($channel, $fileLog, [
|
||||
$pathFile
|
||||
@@ -447,7 +444,7 @@ class MonologProvider
|
||||
if (self::$instance === null) {
|
||||
self::$instance = new MonologProvider($channel, $fileLog, $readLoggingLevel);
|
||||
} else {
|
||||
self::$instance->setConfig($channel, $fileLog);
|
||||
self::$instance->setConfig($channel, $fileLog, $readLoggingLevel);
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
@@ -459,11 +456,14 @@ class MonologProvider
|
||||
*
|
||||
* @param string $channel The logging channel
|
||||
* @param string $fileLog name file
|
||||
* @param boolean $readLoggingLevel
|
||||
*/
|
||||
public function setConfig($channel, $fileLog)
|
||||
public function setConfig($channel, $fileLog, $readLoggingLevel = true)
|
||||
{
|
||||
$this->setStream($fileLog);
|
||||
$this->setLogger($channel);
|
||||
$levelDebug = $this->defineLevelDebug($readLoggingLevel);
|
||||
$this->setLevelDebug($levelDebug);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -319,7 +319,11 @@ try {
|
||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($_SESSION['USER_LOGGED'], array('USR_PASSWORD_HISTORY' => serialize(array(G::encryptOld($pwd)))));
|
||||
$aErrors = $oUserProperty->validatePassword($_POST['form']['USR_PASSWORD'], $aUserProperty['USR_LAST_UPDATE_DATE'], $aUserProperty['USR_LOGGED_NEXT_TIME'], true);
|
||||
|
||||
if (!empty($aErrors) && in_array("ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN", $aErrors)) {
|
||||
if (!isset($enableChangePasswordAfterNextLogin)) {
|
||||
$enableChangePasswordAfterNextLogin = true;
|
||||
}
|
||||
|
||||
if ($enableChangePasswordAfterNextLogin && !empty($aErrors) && in_array("ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN", $aErrors)) {
|
||||
if (!defined('NO_DISPLAY_USERNAME')) {
|
||||
define('NO_DISPLAY_USERNAME', 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user