Grant admin privileges for the admin user, even if not member of the admins group (so admin works even without LL::NG)

This commit is contained in:
Daniel Berteaud 2013-11-08 16:33:37 +01:00
parent 45e17d39f8
commit ed6d6f6986
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ function hook_get_auth_webserver_profile(\$user_name) {
else{
\$email = \$login . '\@$DomainName';
}
if (isset(\$_SERVER['HTTP_USER_GROUPS']) && in_array('admins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS']))){
if ((isset(\$_SERVER['HTTP_USER_GROUPS']) && in_array('admins', preg_split("/; /", \$_SERVER['HTTP_USER_GROUPS']))) ||
(\$login == "admin")){
\$admin = 1;
}
else{