From a8dec53a0cf976702db181c43f46f115b3c39aff Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de> Date: Tue, 10 Dec 2019 14:04:47 +0100 Subject: [PATCH] user profile changes reverted --- js/headfoot.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/js/headfoot.js b/js/headfoot.js index fb20409..04e28a6 100755 --- a/js/headfoot.js +++ b/js/headfoot.js @@ -23,27 +23,6 @@ function userAuthenticated(){ } } -var user = false; - -function profileExistsSetLogin(){ - - $.get( "/api/v1/profile", function(data) { - let email = data.email - if(email != ''){ - user = true; - document.getElementById("navbarDropdown4").innerHTML="Logout"; - document.getElementById("navbarDropdown4").href="/account/logout"; - } - }) - .done(function() { - console.log("done fetching profile info"); - }) - .fail(function() { - console.log( "error fetching profile info" ); - }) - return user; -} - function readCookie(cname) { var name = cname + "="; @@ -157,7 +136,6 @@ function head(){ headitem.appendChild(headlink); navelements.appendChild(headitem); } - profileExistsSetLogin() //user has priority let searchitem = document.createElement('li'); searchitem.classList.add("nav-item"); let searchinput = document.createElement('input'); -- GitLab