aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/authController.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2022-09-18 07:47:51 -0400
committerGravatar GitHub <noreply@github.com> 2022-09-18 13:47:51 +0200
commit37cf23390719ee0c04ce2b1b33d2cc945de69c2f (patch)
treef9d8ada2467f4fd9f3961f817e2ba6b08d11099b /app/Controllers/authController.php
parent3d5b9ac9020f4c14803d77ab76a225091628b79a (diff)
Force default user before rendering login page (#4620)
Diffstat (limited to 'app/Controllers/authController.php')
-rw-r--r--app/Controllers/authController.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 2bcf4eae7..0ad85ea38 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -72,21 +72,22 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
}
$auth_type = FreshRSS_Context::$system_conf->auth_type;
+ FreshRSS_Context::initUser('_');
switch ($auth_type) {
- case 'form':
- Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
- break;
- case 'http_auth':
- Minz_Error::error(403, array('error' => array(_t('feedback.access.denied'),
- ' [HTTP Remote-User=' . htmlspecialchars(httpAuthUser(), ENT_NOQUOTES, 'UTF-8') . ']'
- )), false);
- break;
- case 'none':
- // It should not happen!
- Minz_Error::error(404);
- default:
- // TODO load plugin instead
- Minz_Error::error(404);
+ case 'form':
+ Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
+ break;
+ case 'http_auth':
+ Minz_Error::error(403, array('error' => array(_t('feedback.access.denied'),
+ ' [HTTP Remote-User=' . htmlspecialchars(httpAuthUser(), ENT_NOQUOTES, 'UTF-8') . ']'
+ )), false);
+ break;
+ case 'none':
+ // It should not happen!
+ Minz_Error::error(404);
+ default:
+ // TODO load plugin instead
+ Minz_Error::error(404);
}
}