Fix a bug in user.id parsing

This commit is contained in:
Konstantinos Triantafyllou 2022-08-05 15:23:21 +03:00
parent 460cbdfc9a
commit f8f606ada7
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ export class UserManagementService {
private parseUserInfo(info: any) {
const user: User = new User();
user.id = (info.subscription && info.subscription.indexOf('@')) ? info.subscription.substring(0, info.subscription.indexOf('@')) : info.subscription;
user.id = (info.sub && info.sub.indexOf('@')) ? info.sub.substring(0, info.sub.indexOf('@')) : info.sub;
user.firstname = (info.given_name) ? info.given_name : "";
user.lastname = (info.family_name) ? info.family_name : "";
user.email = info.email.toLowerCase(); // TODO remove, is a quick fix