aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/authController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/authController.php')
-rw-r--r--app/Controllers/authController.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 0839656a5..8feebe9a3 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -61,23 +61,27 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
*
* It forwards to the correct login page (form) or main page if
* the user is already connected.
+ * @throws Minz_ConfigurationParamException
*/
public function loginAction(): void {
if (FreshRSS_Auth::hasAccess() && Minz_Request::paramString('u') === '') {
- Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
+ Minz_Request::forward(['c' => 'index', 'a' => 'index'], true);
}
$auth_type = FreshRSS_Context::$system_conf->auth_type;
FreshRSS_Context::initUser(Minz_User::INTERNAL_USER, false);
switch ($auth_type) {
case 'form':
- Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
+ Minz_Request::forward(['c' => 'auth', 'a' => 'formLogin']);
break;
case 'http_auth':
- Minz_Error::error(403, array('error' => array(_t('feedback.access.denied'),
+ Minz_Error::error(403, [
+ 'error' => [
+ _t('feedback.access.denied'),
' [HTTP Remote-User=' . htmlspecialchars(httpAuthUser(false), ENT_NOQUOTES, 'UTF-8') .
' ; Remote IP address=' . ($_SERVER['REMOTE_ADDR'] ?? '') . ']'
- )), false);
+ ]
+ ], false);
break;
case 'none':
// It should not happen!
@@ -200,12 +204,12 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
Minz_Translate::init(FreshRSS_Context::$user_conf->language);
- Minz_Request::good(_t('feedback.auth.login.success'), [ 'c' => 'index', 'a' => 'index' ]);
+ Minz_Request::good(_t('feedback.auth.login.success'), ['c' => 'index', 'a' => 'index']);
} else {
Minz_Log::warning('Unsafe password mismatch for user ' . $username);
Minz_Request::bad(
_t('feedback.auth.login.invalid'),
- array('c' => 'auth', 'a' => 'login')
+ ['c' => 'auth', 'a' => 'login']
);
}
}
@@ -229,7 +233,7 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
*/
public function registerAction(): void {
if (FreshRSS_Auth::hasAccess()) {
- Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
+ Minz_Request::forward(['c' => 'index', 'a' => 'index'], true);
}
if (max_registrations_reached()) {