Force defining hook_get_auth_webserver_profile

Or it just won't do anything
tags/0.1.7_el5 0.1.7_el5
Daniel Berteaud 9 years ago
parent 6c2188e568
commit 82c7e91444
  1. 48
      root/etc/e-smith/templates/usr/share/limesurvey/application/config/config.php/25ProfileHook

@ -5,32 +5,30 @@ $lang = substr $lang, 0, 2;
$OUT .=<<"EOF";
if (!function_exists('hook_get_auth_webserver_profile')){
function hook_get_auth_webserver_profile(\$user_name) {
if (!isset(\$_SERVER['REMOTE_USER'])){
return false;
}
\$login = \$_SERVER['REMOTE_USER'];
if (isset(\$_SERVER['HTTP_USER_NAME'])){
\$name = \$_SERVER['HTTP_USER_NAME'];
}
else{
\$name = \$login;
}
if (isset(\$_SERVER['HTTP_USER_EMAIL'])){
\$email = \$_SERVER['HTTP_USER_EMAIL'];
}
else{
\$email = \$login . '\@$DomainName';
}
return Array(
'full_name' => \$name,
'email' => \$email,
'lang' => '$lang',
'htmleditormode' => 'inline',
'templatelist' => 'default,basic,MyOrgTemplate',
);
function hook_get_auth_webserver_profile(\$user_name) {
if (!isset(\$_SERVER['REMOTE_USER'])){
return false;
}
\$login = \$_SERVER['REMOTE_USER'];
if (isset(\$_SERVER['HTTP_USER_NAME'])){
\$name = \$_SERVER['HTTP_USER_NAME'];
}
else{
\$name = \$login;
}
if (isset(\$_SERVER['HTTP_USER_EMAIL'])){
\$email = \$_SERVER['HTTP_USER_EMAIL'];
}
else{
\$email = \$login . '\@$DomainName';
}
return Array(
'full_name' => \$name,
'email' => \$email,
'lang' => '$lang',
'htmleditormode' => 'inline',
'templatelist' => 'default,basic,MyOrgTemplate',
);
}
if (!function_exists('hook_get_auth_webserver_permissions')){

Loading…
Cancel
Save