mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-12 16:58:37 +00:00
PHP_AUTH_USER isn't available when using php as cgi
This commit is contained in:
parent
a0aa150418
commit
1810c13b55
2 changed files with 22 additions and 9 deletions
|
@ -100,6 +100,15 @@ if (Session::isLogged()) {
|
|||
$tpl_file = Tools::getTplFile('login');
|
||||
$tpl_vars['http_auth'] = 1;
|
||||
}
|
||||
} elseif(isset($_SERVER['REMOTE_USER'])) {
|
||||
if($poche->store->userExists($_SERVER['REMOTE_USER'])) {
|
||||
$poche->login($referer);
|
||||
} else {
|
||||
$poche->messages->add('e', _('login failed: user doesn\'t exist'));
|
||||
Tools::logm('user doesn\'t exist');
|
||||
$tpl_file = Tools::getTplFile('login');
|
||||
$tpl_vars['http_auth'] = 1;
|
||||
}
|
||||
} else {
|
||||
$tpl_file = Tools::getTplFile('login');
|
||||
$tpl_vars['http_auth'] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue