Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101640148
ConduitAPI_user_find_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 12, 08:43
Size
823 B
Mime Type
text/x-php
Expires
Fri, Feb 14, 08:43 (2 d)
Engine
blob
Format
Raw Data
Handle
24204259
Attached To
rPH Phabricator
ConduitAPI_user_find_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_user_find_Method
extends
ConduitAPI_user_Method
{
public
function
getMethodDescription
()
{
return
"Find user PHIDs which correspond to provided user aliases. "
.
"Returns NULL for aliases which do have any corresponding PHIDs."
;
}
public
function
defineParamTypes
()
{
return
array
(
'aliases'
=>
'required nonempty list<string>'
);
}
public
function
defineReturnType
()
{
return
'nonempty dict<string, phid>'
;
}
public
function
defineErrorTypes
()
{
return
array
(
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$users
=
id
(
new
PhabricatorUser
())->
loadAllWhere
(
'username in (%Ls)'
,
$request
->
getValue
(
'aliases'
));
return
mpull
(
$users
,
'getPHID'
,
'getUsername'
);
}
}
Event Timeline
Log In to Comment