From 2c22232a4700fb782f4d204039f78cb3e0faf71c Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 16 Jul 2018 15:45:45 +0200 Subject: [PATCH] check if a user is logged in strictly by User_hash --- www/common/outer/local-store.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/common/outer/local-store.js b/www/common/outer/local-store.js index 3246f827c..8c39e8e9e 100644 --- a/www/common/outer/local-store.js +++ b/www/common/outer/local-store.js @@ -58,7 +58,7 @@ define([ localStorage[Constants.userHashKey] = sHash; }; - var getBlockHash = LocalStore.getBlockHash = function () { + LocalStore.getBlockHash = function () { return localStorage[Constants.blockHashKey]; }; @@ -71,8 +71,7 @@ define([ }; LocalStore.isLoggedIn = function () { - return typeof getBlockHash() === 'string' || - typeof getUserHash() === "string"; + return typeof getUserHash() === "string"; }; LocalStore.login = function (hash, name, cb) {