Added ability to sign in via username; separated email sign in and sign up config settings

Этот коммит содержится в:
Reed Garmsen
2016-01-13 14:58:49 -08:00
родитель 320fe1c392
Коммит b013f02209
14 изменённых файлов: 407 добавлений и 4 удалений

Просмотреть файл

@@ -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;
}