Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2355652
UserFindConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1003 B
Referenced Files
None
Subscribers
None
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'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 1:47 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
383838
Default Alt Text
UserFindConduitAPIMethod.php (1003 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment