aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/authController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2019-09-18 17:25:31 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-09-18 17:25:31 +0200
commit410c4af6bb92ebd5d4754017a46b7420941345f2 (patch)
tree3e3cf440d8cfa97a745c5ccd3359e97317331a14 /app/Controllers/authController.php
parente761202f8a4c30cd0cb22190728cf0a61a3271bb (diff)
Redirect connected users accessing registration page (#2530)
Diffstat (limited to 'app/Controllers/authController.php')
-rw-r--r--app/Controllers/authController.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 70adaa5d3..e2e1aaa22 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -199,8 +199,16 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
/**
* This action gives possibility to a user to create an account.
+ *
+ * The user is redirected to the home if he's connected.
+ *
+ * A 403 is sent if max number of registrations is reached.
*/
public function registerAction() {
+ if (FreshRSS_Auth::hasAccess()) {
+ Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
+ }
+
if (max_registrations_reached()) {
Minz_Error::error(403);
}