- public getUser(): User | undefined {
- const email = localStorage.getItem(USER_EMAIL_KEY);
- const firstName = localStorage.getItem(USER_FIRST_NAME_KEY);
- const lastName = localStorage.getItem(USER_LAST_NAME_KEY);
- const uuid = this.getUuid();
- const ownerUuid = this.getOwnerUuid();
- const isAdmin = this.getIsAdmin();
- const identityUrl = localStorage.getItem(USER_IDENTITY_URL);
- const prefs = JSON.parse(localStorage.getItem(USER_PREFS) || '{"profile": {}}');
-
- return email && firstName && lastName && uuid && ownerUuid && identityUrl && prefs
- ? { email, firstName, lastName, uuid, ownerUuid, isAdmin, identityUrl, prefs }
- : undefined;