1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Add "verified" or "unverified" to role output in user.query

Summary: See discussion in rP2f138d0501887fd0aca0f8536176f092880f662c.

Test Plan: Ran `user.query` on verified and unverified users.

Reviewers: csilvers, vrana

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2768
This commit is contained in:
epriestley 2012-06-15 17:00:26 -07:00
parent 14648d6d7a
commit 31fcd78c76
2 changed files with 7 additions and 2 deletions

View file

@ -36,6 +36,13 @@ abstract class ConduitAPI_user_Method extends ConduitAPIMethod {
$roles[] = 'admin';
}
$primary = $user->loadPrimaryEmail();
if ($primary && $primary->getIsVerified()) {
$roles[] = 'verified';
} else {
$roles[] = 'unverified';
}
$return = array(
'phid' => $user->getPHID(),
'userName' => $user->getUserName(),

View file

@ -64,8 +64,6 @@ final class ConduitAPI_user_query_Method
$query->withUsernames($usernames);
}
if ($emails) {
// TODO -- validate emails and maybe
// throw new ConduitException('ERR-INVALID-PARAMETER');
$query->withEmails($emails);
}
if ($realnames) {