mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merge branch 'MDL-76172-master' of https://github.com/sarjona/moodle
This commit is contained in:
commit
d3e26c1a2a
@ -488,7 +488,7 @@ class client extends \oauth2_client {
|
||||
/**
|
||||
* Fetch the user info from the user info endpoint.
|
||||
*
|
||||
* @return array|false Moodle user fields for the logged in user (or false if request failed)
|
||||
* @return stdClass|false Moodle user fields for the logged in user (or false if request failed)
|
||||
* @throws moodle_exception if the response is empty after decoding it.
|
||||
*/
|
||||
public function get_raw_userinfo() {
|
||||
@ -528,6 +528,10 @@ class client extends \oauth2_client {
|
||||
*/
|
||||
public function get_userinfo() {
|
||||
$userinfo = $this->get_raw_userinfo();
|
||||
if ($userinfo === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->map_userinfo_to_fields($userinfo);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user