Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100726047
UserFindConduitAPIMethod.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
Sun, Feb 2, 05:49
Size
1003 B
Mime Type
text/x-php
Expires
Tue, Feb 4, 05:49 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24019250
Attached To
rPH Phabricator
UserFindConduitAPIMethod.php
View Options
<?php
final
class
UserFindConduitAPIMethod
extends
UserConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'user.find'
;
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_DEPRECATED
;
}
public
function
getMethodStatusDescription
()
{
return
pht
(
'Obsoleted by "user.query".'
);
}
public
function
getMethodDescription
()
{
return
pht
(
'Lookup PHIDs by username. Obsoleted by "user.query".'
);
}
public
function
defineParamTypes
()
{
return
array
(
'aliases'
=>
'required list<string>'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict<string, phid>'
;
}
public
function
defineErrorTypes
()
{
return
array
(
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$users
=
id
(
new
PhabricatorPeopleQuery
())
->
setViewer
(
$request
->
getUser
())
->
withUsernames
(
$request
->
getValue
(
'aliases'
,
array
()))
->
execute
();
return
mpull
(
$users
,
'getPHID'
,
'getUsername'
);
}
}
Event Timeline
Log In to Comment