diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-12-23 09:09:10 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-12-23 09:09:10 +0100 |
commit | 1810c13b55b01043620fd81a65ce6e84cccc429c (patch) | |
tree | 3eea228ad7e3d9272b0fd92c44544ad8d5eb23a1 /index.php | |
parent | a0aa150418b628b32b18c70436d6be495129ee38 (diff) | |
download | wallabag-1810c13b55b01043620fd81a65ce6e84cccc429c.tar.gz wallabag-1810c13b55b01043620fd81a65ce6e84cccc429c.tar.zst wallabag-1810c13b55b01043620fd81a65ce6e84cccc429c.zip |
PHP_AUTH_USER isn't available when using php as cgi
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -100,6 +100,15 @@ if (Session::isLogged()) { | |||
100 | $tpl_file = Tools::getTplFile('login'); | 100 | $tpl_file = Tools::getTplFile('login'); |
101 | $tpl_vars['http_auth'] = 1; | 101 | $tpl_vars['http_auth'] = 1; |
102 | } | 102 | } |
103 | } elseif(isset($_SERVER['REMOTE_USER'])) { | ||
104 | if($poche->store->userExists($_SERVER['REMOTE_USER'])) { | ||
105 | $poche->login($referer); | ||
106 | } else { | ||
107 | $poche->messages->add('e', _('login failed: user doesn\'t exist')); | ||
108 | Tools::logm('user doesn\'t exist'); | ||
109 | $tpl_file = Tools::getTplFile('login'); | ||
110 | $tpl_vars['http_auth'] = 1; | ||
111 | } | ||
103 | } else { | 112 | } else { |
104 | $tpl_file = Tools::getTplFile('login'); | 113 | $tpl_file = Tools::getTplFile('login'); |
105 | $tpl_vars['http_auth'] = 0; | 114 | $tpl_vars['http_auth'] = 0; |