diff --git a/gulliver/system/class.monologProvider.php b/gulliver/system/class.monologProvider.php index de626d137..03a84e6b9 100644 --- a/gulliver/system/class.monologProvider.php +++ b/gulliver/system/class.monologProvider.php @@ -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); } /** diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index c0a488d1e..6ab0d36f8 100644 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -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); }