diff --git a/packages/rocketchat-custom-oauth/server/custom_oauth_server.js b/packages/rocketchat-custom-oauth/server/custom_oauth_server.js index 0e84a0664e3e..b8983bf8a4d3 100644 --- a/packages/rocketchat-custom-oauth/server/custom_oauth_server.js +++ b/packages/rocketchat-custom-oauth/server/custom_oauth_server.js @@ -194,7 +194,11 @@ export class CustomOAuth { identity.id = identity.user.userid; identity.email = identity.user.email; } - + // Fix for Xenforo [BD]API plugin for 'user.user_id; instead of 'id' + if (identity.user && identity.user.user_id && !identity.id) { + identity.id = identity.user.user_id; + identity.email = identity.user.user_email; + } // Fix general 'phid' instead of 'id' from phabricator if (identity.phid && !identity.id) { identity.id = identity.phid;