diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-02-03 07:33:43 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-02-03 07:33:43 -0500 |
commit | 4a09adeb391b23c7e850fec96a2e8a731b70d755 (patch) | |
tree | ca9cc2410dc17de823d923c9e0ff74fea16d2a82 /web/react/stores | |
parent | d31ae207389b7402debbcaa40bb691e86023f1ba (diff) | |
parent | b013f02209c7c128a35d1c54f2d4a7d6a9701f72 (diff) | |
download | chat-4a09adeb391b23c7e850fec96a2e8a731b70d755.tar.gz chat-4a09adeb391b23c7e850fec96a2e8a731b70d755.tar.bz2 chat-4a09adeb391b23c7e850fec96a2e8a731b70d755.zip |
Merge pull request #1991 from rgarmsen2295/plt-976
PLT-976 Adds ability to sign in with username
Diffstat (limited to 'web/react/stores')
-rw-r--r-- | web/react/stores/user_store.jsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx index 3e1871180..b97a0d87b 100644 --- a/web/react/stores/user_store.jsx +++ b/web/react/stores/user_store.jsx @@ -38,6 +38,8 @@ class UserStoreClass extends EventEmitter { this.setCurrentUser = this.setCurrentUser.bind(this); this.getLastEmail = this.getLastEmail.bind(this); this.setLastEmail = this.setLastEmail.bind(this); + this.getLastUsername = this.getLastUsername.bind(this); + this.setLastUsername = this.setLastUsername.bind(this); this.hasProfile = this.hasProfile.bind(this); this.getProfile = this.getProfile.bind(this); this.getProfileByUsername = this.getProfileByUsername.bind(this); @@ -159,6 +161,14 @@ class UserStoreClass extends EventEmitter { BrowserStore.setGlobalItem('last_email', email); } + getLastUsername() { + return BrowserStore.getGlobalItem('last_username', ''); + } + + setLastUsername(username) { + BrowserStore.setGlobalItem('last_username', username); + } + hasProfile(userId) { return this.getProfiles()[userId] != null; } |