Fixed error when log in as admin with saml login method.

This commit is contained in:
Arturo Gonzalez 2016-04-06 11:07:26 +02:00
parent 902c5371f9
commit 497e56510a
1 changed files with 76 additions and 81 deletions

View File

@ -288,15 +288,10 @@ if (! isset ($config['id_user'])) {
$nick_in_db = $_SESSION["prepared_login_da"]['id_user'];
$expired_pass = false;
}
else if (($config['auth'] == 'saml') && $login_button_saml) {
if (is_user_admin($nick)) {
$nick_in_db = $nick;
}
else {
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
$saml_user_id = saml_process_user_login();
$nick_in_db = $saml_user_id;
}
else if (($config['auth'] == 'saml') && $login_button_saml && !is_user_admin($nick)) {
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
$saml_user_id = saml_process_user_login();
$nick_in_db = $saml_user_id;
}
else {
// process_user_login is a virtual function which should be defined in each auth file.