Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102310311
ConduitAPI_user_info_Method.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 19, 09:15
Size
977 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 09:15 (2 d)
Engine
blob
Format
Raw Data
Handle
24251098
Attached To
rPH Phabricator
ConduitAPI_user_info_Method.php
View Options
<?php
final
class
ConduitAPI_user_info_Method
extends
ConduitAPI_user_Method
{
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_DEPRECATED
;
}
public
function
getMethodStatusDescription
()
{
return
"Replaced by 'user.query'."
;
}
public
function
getMethodDescription
()
{
return
'Retrieve information about a user by PHID.'
;
}
public
function
defineParamTypes
()
{
return
array
(
'phid'
=>
'required phid'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict<string, wild>'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR-BAD-USER'
=>
'No such user exists.'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$user
=
id
(
new
PhabricatorUser
())->
loadOneWhere
(
'phid = %s'
,
$request
->
getValue
(
'phid'
));
if
(!
$user
)
{
throw
new
ConduitException
(
'ERR-BAD-USER'
);
}
return
$this
->
buildUserInformationDictionary
(
$user
);
}
}
Event Timeline
Log In to Comment