@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 22 lines 559 B view raw
1<?php 2 3final class PhortuneLandingController extends PhortuneController { 4 5 public function handleRequest(AphrontRequest $request) { 6 $viewer = $request->getViewer(); 7 8 $accounts = PhortuneAccountQuery::loadAccountsForUser( 9 $viewer, 10 PhabricatorContentSource::newFromRequest($request)); 11 12 if (count($accounts) == 1) { 13 $account = head($accounts); 14 $next_uri = $account->getURI(); 15 } else { 16 $next_uri = $this->getApplicationURI('account/'); 17 } 18 19 return id(new AphrontRedirectResponse())->setURI($next_uri); 20 } 21 22}