- 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 isActive = this.getIsActive();
- const username = localStorage.getItem(USER_USERNAME);
- const prefs = JSON.parse(localStorage.getItem(USER_PREFS) || '{"profile": {}}');
-
- return email && firstName && lastName && uuid && ownerUuid && username && prefs
- ? { email, firstName, lastName, uuid, ownerUuid, isAdmin, isActive, username, prefs }
- : undefined;