Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101103824
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
Wed, Feb 5, 19:02
Size
797 B
Mime Type
text/x-php
Expires
Fri, Feb 7, 19:02 (2 d)
Engine
blob
Format
Raw Data
Handle
24093151
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
=
PhortuneAccount
::
createNewAccount
(
$user
,
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