Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F552422
UserWhoAmIConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
882 B
Referenced Files
None
Subscribers
None
UserWhoAmIConduitAPIMethod.php
View Options
<?php
final
class
UserWhoAmIConduitAPIMethod
extends
UserConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'user.whoami'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Retrieve information about the logged-in user.'
);
}
protected
function
defineParamTypes
()
{
return
array
();
}
protected
function
defineReturnType
()
{
return
'nonempty dict<string, wild>'
;
}
public
function
getRequiredScope
()
{
return
self
::
SCOPE_ALWAYS
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$person
=
id
(
new
PhabricatorPeopleQuery
())
->
setViewer
(
$request
->
getUser
())
->
needProfileImage
(
true
)
->
withPHIDs
(
array
(
$request
->
getUser
()->
getPHID
()))
->
executeOne
();
return
$this
->
buildUserInformationDictionary
(
$person
,
$with_email
=
true
,
$with_availability
=
false
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 4:24 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
110479
Default Alt Text
UserWhoAmIConduitAPIMethod.php (882 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment