check if a user is logged in strictly by User_hash

This commit is contained in:
ansuz 2018-07-16 15:45:45 +02:00
parent 848a918eda
commit 2c22232a47

View File

@ -58,7 +58,7 @@ define([
localStorage[Constants.userHashKey] = sHash; localStorage[Constants.userHashKey] = sHash;
}; };
var getBlockHash = LocalStore.getBlockHash = function () { LocalStore.getBlockHash = function () {
return localStorage[Constants.blockHashKey]; return localStorage[Constants.blockHashKey];
}; };
@ -71,8 +71,7 @@ define([
}; };
LocalStore.isLoggedIn = function () { LocalStore.isLoggedIn = function () {
return typeof getBlockHash() === 'string' || return typeof getUserHash() === "string";
typeof getUserHash() === "string";
}; };
LocalStore.login = function (hash, name, cb) { LocalStore.login = function (hash, name, cb) {