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

tags/0.1.0 0.1.0
Daniel Berteaud 11 years ago
parent 45e17d39f8
commit ed6d6f6986
  1. 3
      root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook

@ -22,7 +22,8 @@ function hook_get_auth_webserver_profile(\$user_name) {
else{ else{
\$email = \$login . '\@$DomainName'; \$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; \$admin = 1;
} }
else{ else{

Loading…
Cancel
Save