MDL-59511 oauth2: Allow empty email in system account

This commit is contained in:
Jan Dageförde
2017-07-28 10:07:25 +02:00
parent d509f80c48
commit 3fa588c637
4 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ class api {
$record->issuerid = $issuer->get('id');
$record->refreshtoken = $refreshtoken;
$record->grantedscopes = $scopes;
$record->email = $userinfo['email'];
$record->email = isset($userinfo['email']) ? $userinfo['email'] : '';
$record->username = $userinfo['username'];
$systemaccount = new system_account(0, $record);