X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=auth%2Fstatic%2Fjs%2Flogout.js;fp=auth%2Fstatic%2Fjs%2Flogout.js;h=593eb5885048dfe0e6af10ef313f606910169509;hb=400f19d8c83adcb4fbb0aecb800f8ed0010d59ea;hp=9c9b45326cbc109b240ac5fa6be55392d27cd86a;hpb=9cbecc70e8916a0574e32088a15617c33c03bf9d;p=myslice.git diff --git a/auth/static/js/logout.js b/auth/static/js/logout.js index 9c9b4532..593eb588 100644 --- a/auth/static/js/logout.js +++ b/auth/static/js/logout.js @@ -4,7 +4,10 @@ function logout () { var username=$(this).data('username'); var msg="Are you sure you want to logout as " + username + " ?"; /* redirect to /logout, see urls.py */ - if (confirm(msg)) window.location="/logout/"; + if (confirm(msg)){ + localStorage.removeItem('user'); + window.location="/logout/"; + } } /* attach this function to the logout button */ $(document).ready(function() { $('#logout').click(logout); $('#logoutbtn').click(logout); });