check if a user is logged in strictly by User_hash
This commit is contained in:
parent
848a918eda
commit
2c22232a47
@ -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) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user