fixed ad authentication
This commit is contained in:
parent
6cf96a0fad
commit
43701f953d
|
@ -85,7 +85,7 @@ function process_user_login($login, $pass, $api=false)
|
||||||
return process_user_login_local($login, $pass, $api);
|
return process_user_login_local($login, $pass, $api);
|
||||||
} else {
|
} else {
|
||||||
$login_remote = process_user_login_remote($login, io_safe_output($pass), $api);
|
$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);
|
return process_user_login_local($login, $pass, $api);
|
||||||
} else {
|
} else {
|
||||||
return $login_remote;
|
return $login_remote;
|
||||||
|
@ -258,9 +258,13 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($config['auth'] === 'ad')
|
if (($config['auth'] === 'ad')) {
|
||||||
&& (isset($config['ad_advanced_config']) && $config['ad_advanced_config'])
|
// 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(
|
$return = enterprise_hook(
|
||||||
'prepare_permissions_groups_of_user_ad',
|
'prepare_permissions_groups_of_user_ad',
|
||||||
[
|
[
|
||||||
|
@ -281,6 +285,7 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if ($config['auth'] === 'ldap') {
|
} else if ($config['auth'] === 'ldap') {
|
||||||
// Check if autocreate remote users is active.
|
// Check if autocreate remote users is active.
|
||||||
if ($config['autocreate_remote_users'] == 1) {
|
if ($config['autocreate_remote_users'] == 1) {
|
||||||
|
|
Loading…
Reference in New Issue