Add access node in auth ad method in all cases. Gitlab: #367

This commit is contained in:
m-lopez-f 2017-03-08 12:09:22 +01:00
parent a904e3c9b0
commit 79e04c13c2
1 changed files with 7 additions and 4 deletions

View File

@ -304,11 +304,14 @@ function process_user_login_remote ($login, $pass, $api = false) {
}
}
else {
$user_info = array ('fullname' => $login,
'comments' => 'Imported from ' . $config['auth']);
if ( is_metaconsole() && $config["auth"] === 'ad')
$user_info['metaconsole_access_node'] = true;
// Create the user in the local database
if (create_user ($login, $pass,
array ('fullname' => $login,
'comments' => 'Imported from ' . $config['auth'])
) === false) {
if (create_user ($login, $pass, $user_info) === false) {
$config["auth_error"] = __("User not found in database or incorrect password");
return false;
}