diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-01-13 14:58:49 -0800 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-02-02 12:07:42 -0800 |
commit | b013f02209c7c128a35d1c54f2d4a7d6a9701f72 (patch) | |
tree | fac16d12e465a1a3050b0023fbadb7dce33f948c /web/react/stores | |
parent | 320fe1c39240644ce15fa2a436ac4a5591b95083 (diff) | |
download | chat-b013f02209c7c128a35d1c54f2d4a7d6a9701f72.tar.gz chat-b013f02209c7c128a35d1c54f2d4a7d6a9701f72.tar.bz2 chat-b013f02209c7c128a35d1c54f2d4a7d6a9701f72.zip |
Added ability to sign in via username; separated email sign in and sign up config settings
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; } |