By snathan99 on
I recently installed drupal and created a user account. Then signed out of admin and logged in with the new user account. The new account does not have anything so there is not even a logout link! So basically I was stuck unable to logout. After much search there was no answer on the web. So when I did find the answer (by logging in using another browser, being too lazy to delete cookies) and looking at the link URL for logout which is http://DRUPAL_SITE_ROOT/user/logout, I decided to post it right away ... I am sure I am not the only one with this issue!
Comments
http://DRUPAL_SITE_ROOT/logou
http://DRUPAL_SITE_ROOT/logoutWhat's new and changing in PHP 8.4
Who stole the logout link?
For me the question is more like how I can get the link back. Why did it disappear? I know that it happened when I upgraded from 6 to 7. The rest looks ok, but the logout link is gone.
Br, freefox.
Check the menu items whether
Check the menu items whether there is a "logout" item linked to /logout
if not, you'd safely add one manually.
What's new and changing in PHP 8.4
logout is blocked?
Both /logout and /user/logout returns "The path '/logout' is either invalid or you do not have permissions." when I try to create a logout link.
The same happens when I try to logout 'manually' with
http://<my_site>/?=user/logoutIt returns "Access denied".
http://<my_site>/logoutreturns "Object not found".More ideas, please.
Br, freefox.
SOLVED: logout is blocked?
This was strange, but anyhow...
I've got a multi site installation. I logged into an other site and logout out from there. That made me logged out from the first site too!
Now I could create my logout link.
Thanks for response. BR, freefox.
Logout solution for 7.14
For others out there having the same problem.
Your URL/user/logout works in Drupal 7.14.
works for me
this worked for me, thanks
this solution worked. thanks
this solution worked. thanks
user = the name of the user
This works for me if I substitute the logged-in username for 'user', like this:
http://<my_site>/<my_user>/logoutie:
http://example.com/jdoe/logoutCheers!
=-=
which indicates that you are aliasing the default user path in some way.
Thank you very much ! i just
Thank you very much ! i just had the same problem and found myself very stupid !
User/logout
Hi All,
http://your site name/user/logout
I have tested it on following version, working for following version.
drupal-7.23
drupal-7.26
drupal 7.31
Drupal multisite instance.
7.32
Just had this same problem using Drupal 7.32. None of the above solutions worked.
However, this worked for me:
http://your-website-root/?q=user/logout
=-=
which indicates that you don't have clean urls enabled. hence the ?q= in the path.
Enable User Menu
The logout option is in the User Menu. You can go to Structure->Menus and Place the User Menu block in some region.
=-=
If one is still logged in you are correct. However, the opening post states that the user logged out. As such, there isn't a way to enable the menu block in any region.
Grant permission for "Access administration menu"
The logout link is in the administration toolbar next to the username. Therefore you need to grant the "Access administration menu" permission to the user to show the logout link.
Best,
=-=
It is certainly an option but not the only option. If the preference is avoid granting extra permissions to modules or if someone isn't already using the admin menu module, the logout links provided by default are perfectly fine.
D7 logout
Add a new menu and place it under any Parent Menu that you want. For the path use "user/logout". Do not use a preceding "/".
If you want to logout with a menu item, insert the above line at the end of the URL in the browser. http://www.website.com/user/logout
With drupal 7.59 I've gotten
With drupal 7.59 I've gotten it with /<mydomain>/user/logout
D8 logout link
With drupal 8.x, same query string will work
/<mydomain>/user/logout
authenticate user logout
thanks for your answer...
consider adding a [logout] tab to user pages
For a long term enhancement, you can consider adding a [logout] tab to user pages.
https://www.drupal.org/project/logouttab
Additional enhancements are possible by creating site menu items that display logout versus login, depending on visitor state. The following module can implement this feature on a D8 site.
https://www.drupal.org/project/menu_item_role_access