A free, self-hostable news aggregator…
Redirect connected users accessing registration page (#2530)
Marien Fressinaud410c4af6bb92
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.phpindex 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);}