New module part webportallogin to allow login method definition by external modules in Dolibarr webportal (#36037)
* New module part webportallogin to allow login method definition by external modules in Dolibarr webportal * Update webportal.main.inc.php add WEBPORTAL_LOGIN_BY_MODULE to enable disable login by modules * Fix condition check for web portal login module --------- Co-authored-by: abb <contact@ab1consult.com> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
a2c1bc77c2
commit
f2b0873e26
1 changed files with 7 additions and 1 deletions
|
|
@ -133,7 +133,13 @@ if (!defined('WEBPORTAL_NOREQUIRETRAN') || (!defined('WEBPORTAL_NOLOGIN') && !em
|
|||
/*
|
||||
* Phase authentication / login
|
||||
*/
|
||||
if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->accessNeedLoggedUser)) {
|
||||
if (getDolGlobalInt('WEBPORTAL_LOGIN_BY_MODULE') && !empty($conf->modules_parts['webportallogin']) && is_array($conf->modules_parts['webportallogin'])) {
|
||||
foreach ($conf->modules_parts['webportallogin'] as $module => $file) {
|
||||
$path=dol_buildpath("/$module/$file");
|
||||
include_once $path;
|
||||
break;
|
||||
}
|
||||
} elseif (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->accessNeedLoggedUser)) {
|
||||
$error = 0;
|
||||
|
||||
// Hooks for security access
|
||||
|
|
|
|||
Loading…
Reference in a new issue