From 72a0c15506d5300767a9a7184efb0af70086a24b Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 18 Sep 2019 17:25:31 +0200 Subject: [PATCH] Redirect connected users accessing registration page (#2530) --- app/Controllers/authController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index 70adaa5d3c68..e2e1aaa22ecd 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -199,8 +199,16 @@ public function logoutAction() { /** * 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); }