diff options
Diffstat (limited to 'client/src/app/core/auth/auth-user.model.ts')
-rw-r--r-- | client/src/app/core/auth/auth-user.model.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts index 7115b9781..f827bd6ca 100644 --- a/client/src/app/core/auth/auth-user.model.ts +++ b/client/src/app/core/auth/auth-user.model.ts | |||
@@ -5,6 +5,7 @@ export class AuthUser extends User { | |||
5 | private static KEYS = { | 5 | private static KEYS = { |
6 | ID: 'id', | 6 | ID: 'id', |
7 | ROLE: 'role', | 7 | ROLE: 'role', |
8 | EMAIL: 'email', | ||
8 | USERNAME: 'username', | 9 | USERNAME: 'username', |
9 | DISPLAY_NSFW: 'display_nsfw' | 10 | DISPLAY_NSFW: 'display_nsfw' |
10 | }; | 11 | }; |
@@ -18,6 +19,7 @@ export class AuthUser extends User { | |||
18 | { | 19 | { |
19 | id: parseInt(localStorage.getItem(this.KEYS.ID)), | 20 | id: parseInt(localStorage.getItem(this.KEYS.ID)), |
20 | username: localStorage.getItem(this.KEYS.USERNAME), | 21 | username: localStorage.getItem(this.KEYS.USERNAME), |
22 | email: localStorage.getItem(this.KEYS.EMAIL), | ||
21 | role: localStorage.getItem(this.KEYS.ROLE), | 23 | role: localStorage.getItem(this.KEYS.ROLE), |
22 | displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true' | 24 | displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true' |
23 | }, | 25 | }, |
@@ -40,6 +42,7 @@ export class AuthUser extends User { | |||
40 | id: number, | 42 | id: number, |
41 | username: string, | 43 | username: string, |
42 | role: string, | 44 | role: string, |
45 | email: string, | ||
43 | displayNSFW: boolean | 46 | displayNSFW: boolean |
44 | }, hashTokens: any) { | 47 | }, hashTokens: any) { |
45 | super(userHash); | 48 | super(userHash); |