mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-5905-10107-AD-Fallback-to-local-authentication-activo-siempre' into 'develop'
fixed ad authentication See merge request artica/pandorafms!3269
This commit is contained in:
commit
1e745c927c
@ -85,7 +85,7 @@ function process_user_login($login, $pass, $api=false)
|
||||
return process_user_login_local($login, $pass, $api);
|
||||
} else {
|
||||
$login_remote = process_user_login_remote($login, io_safe_output($pass), $api);
|
||||
if ($login_remote == false) {
|
||||
if ($login_remote == false && $config['fallback_local_auth']) {
|
||||
return process_user_login_local($login, $pass, $api);
|
||||
} else {
|
||||
return $login_remote;
|
||||
@ -258,9 +258,13 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (($config['auth'] === 'ad')
|
||||
&& (isset($config['ad_advanced_config']) && $config['ad_advanced_config'])
|
||||
) {
|
||||
if (($config['auth'] === 'ad')) {
|
||||
// Check if autocreate remote users is active.
|
||||
if ($config['autocreate_remote_users'] == 1) {
|
||||
change_local_user_pass_ldap($login, $pass);
|
||||
}
|
||||
|
||||
if (isset($config['ad_advanced_config']) && $config['ad_advanced_config']) {
|
||||
$return = enterprise_hook(
|
||||
'prepare_permissions_groups_of_user_ad',
|
||||
[
|
||||
@ -281,6 +285,7 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ($config['auth'] === 'ldap') {
|
||||
// Check if autocreate remote users is active.
|
||||
if ($config['autocreate_remote_users'] == 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user