diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 596cdfb8e7e..0e0d4a37946 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -131,8 +131,8 @@ if (! function_exists('dol_loginfunction')) */ function dol_loginfunction($langs, $conf, $mysoc) { - global $dolibarr_main_demo,$db; - global $smartphone,$hookmanager; + global $dolibarr_main_demo, $db; + global $hookmanager; $langs->loadLangs(array("main","other","help","admin")); @@ -207,11 +207,7 @@ if (! function_exists('dol_loginfunction')) // Execute hook getLoginPageOptions (for table) $parameters=array('entity' => GETPOST('entity', 'int')); $reshook = $hookmanager->executeHooks('getLoginPageOptions', $parameters); // Note that $action and $object may have been modified by some hooks. - if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) { - $morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility - } else { - $morelogincontent = $hookmanager->resPrint; - } + $morelogincontent = $hookmanager->resPrint; // Execute hook getLoginPageExtraOptions (eg for js) $parameters=array('entity' => GETPOST('entity', 'int')); @@ -445,7 +441,8 @@ function encodedecode_dbpassconf($level = 0) * * @param boolean $generic true=Create generic password (32 chars/numbers), false=Use the configured password generation module * @param array $replaceambiguouschars Discard ambigous characters. For example array('I'). - * @return string New value for password + * @param int $length Length of random string (Used only if $generic is true) + * @return string New value for password * @see dol_hash() */ function getRandomPassword($generic = false, $replaceambiguouschars = null, $length = 32)