Skip to content

Commit 1acfae4

Browse files
committed
Fix getUsernameByEmail()
1 parent 3b0e168 commit 1acfae4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/DiscourseAPI.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ function activateUser($userId)
206206

207207
function getUsernameByEmail($email)
208208
{
209-
$users = $this->_getRequest("/admin/users/list/active.json?filter=".urlencode($email));
209+
$users = $this->_getRequest('/admin/users/list/active.json',
210+
[ 'filter' => $email, 'show_emails' => 'true' ]
211+
);
210212
foreach($users->apiresult as $user) {
211213
if($user->email === $email) {
212214
return $user->username;

0 commit comments

Comments
 (0)