Browse Source

[Web, oAuth2] Add id parameter to profile.php (#4235)

Sending $token['user_id'] also as 'id' in the array
tunnelpr0 4 years ago
parent
commit
62fbaf8248
1 changed files with 1 additions and 0 deletions
  1. 1 0
      data/web/oauth/profile.php

+ 1 - 0
data/web/oauth/profile.php

@@ -15,6 +15,7 @@ if (!empty($mailbox)) {
     echo json_encode(array(
     echo json_encode(array(
       'success' => true,
       'success' => true,
       'username' => $token['user_id'],
       'username' => $token['user_id'],
+      'id' => $token['user_id'],
       'identifier' => $token['user_id'],
       'identifier' => $token['user_id'],
       'email' => (!empty($mailbox['username']) ? $mailbox['username'] : ''),
       'email' => (!empty($mailbox['username']) ? $mailbox['username'] : ''),
       'full_name' => (!empty($mailbox['name']) ? $mailbox['name'] : 'mailcow administrative user'),
       'full_name' => (!empty($mailbox['name']) ? $mailbox['name'] : 'mailcow administrative user'),