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.php23
1 files changed, 16 insertions, 7 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 937c0759d..f58b008de 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -123,8 +123,8 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
$conf = get_user_configuration($username);
if (is_null($conf)) {
- Minz_Request::bad(_t('feedback.auth.login.invalid'),
- array('c' => 'auth', 'a' => 'login'));
+ Minz_Error::error(403, array(_t('feedback.auth.login.invalid')), false);
+ return;
}
$ok = FreshRSS_FormAuth::checkCredentials(
@@ -151,8 +151,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
' user=' . $username .
', nonce=' . $nonce .
', c=' . $challenge);
- Minz_Request::bad(_t('feedback.auth.login.invalid'),
- array('c' => 'auth', 'a' => 'login'));
+ Minz_Error::error(403, array(_t('feedback.auth.login.invalid')), false);
}
} elseif (FreshRSS_Context::$system_conf->unsafe_autologin_enabled) {
$username = Minz_Request::param('u', '');
@@ -184,8 +183,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
array('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'));
+ Minz_Error::error(403, array(_t('feedback.auth.login.invalid')), false);
}
}
}
@@ -253,7 +251,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
FreshRSS_Auth::giveAccess();
invalidateHttpCache();
} else {
- Minz_Log::error($reason);
+ Minz_Log::warning($reason);
$res = array();
$res['status'] = 'failure';
@@ -346,4 +344,15 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
}
}
}
+
+ /**
+ * This action gives possibility to a user to create an account.
+ */
+ public function registerAction() {
+ if (max_registrations_reached()) {
+ Minz_Error::error(403);
+ }
+
+ Minz_View::prependTitle(_t('gen.auth.registration.title') . ' ยท ');
+ }
}