Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112324564
PhortuneLandingController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 10, 01:13
Size
793 B
Mime Type
text/x-php
Expires
Mon, May 12, 01:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26058615
Attached To
rPH Phabricator
PhortuneLandingController.php
View Options
<?php
final
class
PhortuneLandingController
extends
PhortuneController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$accounts
=
id
(
new
PhortuneAccountQuery
())
->
setViewer
(
$viewer
)
->
withMemberPHIDs
(
array
(
$viewer
->
getPHID
()))
->
execute
();
if
(!
$accounts
)
{
$account
=
PhortuneAccount
::
createNewAccount
(
$viewer
,
PhabricatorContentSource
::
newFromRequest
(
$request
));
$accounts
=
array
(
$account
);
}
if
(
count
(
$accounts
)
==
1
)
{
$account
=
head
(
$accounts
);
$next_uri
=
$this
->
getApplicationURI
(
$account
->
getID
().
'/'
);
}
else
{
$next_uri
=
$this
->
getApplicationURI
(
'account/'
);
}
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
$next_uri
);
}
}
Event Timeline
Log In to Comment