Skip to content

Commit

Permalink
Redirect connected users accessing registration page (FreshRSS#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
marienfressinaud authored and Alkarex committed Sep 18, 2019
1 parent 2543502 commit 72a0c15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Controllers/authController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 72a0c15

Please sign in to comment.