Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F443824
ConduitAPI_user_Method.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ConduitAPI_user_Method.php
View Options
<?php
abstract
class
ConduitAPI_user_Method
extends
ConduitAPIMethod
{
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorPeopleApplication'
);
}
protected
function
buildUserInformationDictionary
(
PhabricatorUser
$user
,
PhabricatorCalendarEvent
$current_status
=
null
)
{
$roles
=
array
();
if
(
$user
->
getIsDisabled
())
{
$roles
[]
=
'disabled'
;
}
if
(
$user
->
getIsSystemAgent
())
{
$roles
[]
=
'agent'
;
}
if
(
$user
->
getIsAdmin
())
{
$roles
[]
=
'admin'
;
}
$primary
=
$user
->
loadPrimaryEmail
();
if
(
$primary
&&
$primary
->
getIsVerified
())
{
$roles
[]
=
'verified'
;
}
else
{
$roles
[]
=
'unverified'
;
}
if
(
$user
->
getIsApproved
())
{
$roles
[]
=
'approved'
;
}
if
(
$user
->
isUserActivated
())
{
$roles
[]
=
'activated'
;
}
$return
=
array
(
'phid'
=>
$user
->
getPHID
(),
'userName'
=>
$user
->
getUserName
(),
'realName'
=>
$user
->
getRealName
(),
'image'
=>
$user
->
loadProfileImageURI
(),
'uri'
=>
PhabricatorEnv
::
getURI
(
'/p/'
.
$user
->
getUsername
().
'/'
),
'roles'
=>
$roles
,
);
if
(
$current_status
)
{
$return
[
'currentStatus'
]
=
$current_status
->
getTextStatus
();
$return
[
'currentStatusUntil'
]
=
$current_status
->
getDateTo
();
}
return
$return
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 11:08 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64804
Default Alt Text
ConduitAPI_user_Method.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment