Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect connected users accessing registration page #2530

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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