Skip to content

Commit ddd1c43

Browse files
authored
Merge pull request communiteq#8 from martinduparc/master
Added get user by external id method
2 parents 5c39c87 + bb7daf5 commit ddd1c43

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/DiscourseAPI.php

+12
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,18 @@ function getUserByUsername($userName)
230230
{
231231
return $this->_getRequest("/users/{$userName}.json");
232232
}
233+
234+
/**
235+
* getUserByExternalID
236+
*
237+
* @param string $externalID external id of sso user
238+
*
239+
* @return mixed HTTP return code and API return object
240+
*/
241+
function getUserByExternalID($externalID)
242+
{
243+
return $this->_getRequest("/users/by-external/{$externalID}.json");
244+
}
233245

234246
/**
235247
* createCategory

0 commit comments

Comments
 (0)