Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14031399
D11791.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11791.diff
View Options
diff --git a/src/applications/people/conduit/UserConduitAPIMethod.php b/src/applications/people/conduit/UserConduitAPIMethod.php
--- a/src/applications/people/conduit/UserConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserConduitAPIMethod.php
@@ -23,8 +23,10 @@
$primary = $user->loadPrimaryEmail();
if ($primary && $primary->getIsVerified()) {
+ $email = $primary->getAddress();
$roles[] = 'verified';
} else {
+ $email = null;
$roles[] = 'unverified';
}
@@ -37,12 +39,13 @@
}
$return = array(
- 'phid' => $user->getPHID(),
- 'userName' => $user->getUserName(),
- 'realName' => $user->getRealName(),
- 'image' => $user->getProfileImageURI(),
- 'uri' => PhabricatorEnv::getURI('/p/'.$user->getUsername().'/'),
- 'roles' => $roles,
+ 'phid' => $user->getPHID(),
+ 'userName' => $user->getUserName(),
+ 'realName' => $user->getRealName(),
+ 'primaryEmail' => $email,
+ 'image' => $user->getProfileImageURI(),
+ 'uri' => PhabricatorEnv::getURI('/p/'.$user->getUsername().'/'),
+ 'roles' => $roles,
);
if ($current_status) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 10:17 AM (2 d, 16 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735849
Default Alt Text
D11791.diff (1 KB)
Attached To
Mode
D11791: Conduit - return primary email if its verified in user methods
Attached
Detach File
Event Timeline
Log In to Comment