1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

When a user tries to regsiter while logged in, just send them home

Summary: This error message is pointless and dead-ends logged-in users needlessly if they're sent to the register page by documentation or Advanced Enterprise Sales Funnels.

Test Plan: Visited `/auth/register/` while logged in, was sent home.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15739
This commit is contained in:
epriestley 2016-04-16 18:49:37 -07:00
parent 025b243e27
commit eef2172161

View file

@ -12,7 +12,7 @@ final class PhabricatorAuthRegisterController
$account_key = $request->getURIData('akey');
if ($request->getUser()->isLoggedIn()) {
return $this->renderError(pht('You are already logged in.'));
return id(new AphrontRedirectResponse())->setURI('/');
}
$is_setup = false;