Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90548381
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, Nov 2, 16:05
Size
719 B
Mime Type
text/x-php
Expires
Mon, Nov 4, 16:05 (2 d)
Engine
blob
Format
Raw Data
Handle
22096025
Attached To
rPH Phabricator
PhortuneLandingController.php
View Options
<?php
final
class
PhortuneLandingController
extends
PhortuneController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$accounts
=
id
(
new
PhortuneAccountQuery
())
->
setViewer
(
$user
)
->
withMemberPHIDs
(
array
(
$user
->
getPHID
()))
->
execute
();
if
(!
$accounts
)
{
$account
=
$this
->
createUserAccount
(
$user
);
$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