Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [logout]

The tag has no usage guidance.

0
votes
0answers
11 views

Session Experies and Get Logged Out Within Few Minutes

I have wordpress simple blog with few plugins installed. My problem is that after logging and working for few minutes (hardly 2-5 minutes), session expires and I get logged out of the admin area. ...
0
votes
2answers
1k views

how to refresh page after user logout with 'wp_logout_url'?

I have written a plugin for my own site where I have an issue like "after user login to the site if he logout then again if he clicks on browser back button then the previous page showing again ...
2
votes
1answer
48 views

wp_logout() changes in WordPress 5.1.1

We've recently just upgraded our WordPress site to 5.1.1 After the upgrade, we've started encountering issues when executing the wp_logout() function of WordPress. Somehow we're getting a 302 ...
0
votes
0answers
9 views

Uploading images causes LogOut

We are experimenting an peculiar problem randomly when we upload an image. No matter the size or kind of image this will trigger a logout to every user that is uploading in a post the images. We ...
5
votes
1answer
9k views

Destroy user sessions based on user ID

I want to programatically log a specific user out of our WordPress system based on their user ID much like the 'Log Out of All Sessions' button in the WordPress user editor section. How am I able to ...
5
votes
4answers
9k views

How to change the default logout link on WordPress Admin

I want to use another link for logout because I have /wp-admin/* protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout then use it as my new ...
10
votes
3answers
50k views

How to log out without confirmation 'Do you really want to log out?"?

Right now when I log out via: <a href="<?php bloginfo('url'); ?>/wp-login.php?action=logout">Log out</a> it redirects me to the page where I need to confirm the log out. How to ...
0
votes
1answer
53 views

Logout without confirmation and SAME window on mobile

I using this code to logout. It works except on mobile it opens a new window. How can I logout with confirmation and redirect to to the same window? add_action('check_admin_referer', '...
0
votes
1answer
588 views

How to ristrict browser back button after logout?

I'm facing a issue from couple of days, after logout user can view the login user history details using browser back button, so how could I resolve this issue. Could you suggest me to solve this issue ...
0
votes
1answer
634 views

wp_logout problem

I have added custom page '/member-logout/' in nav walker for user logout. When activated then the function 'render-logout' is fired function render_logout() { if ( is_user_logged_in() ){ ...
1
vote
1answer
642 views

After logout browser's back button into twenty sixteen theme profile

I have tried numerous ways to prevent the browser's back button from allowing someone from using it to go back into a visitors logged out profile. The codes I used were supposed to prevent the browser ...
1
vote
2answers
3k views

share login/logout sessions across two installs?

I'm having some issues sharing the user sessions across two installs. (a) site on http://stolenmx.com (b) site on http://arcade.stolenmx.com I have installed B in the same database as A and I have ...
0
votes
1answer
23 views

How do I replace “Log Out” from the Menu with “My Orders”?

After the user clicks on Log In, the Log In option changes to Log Out in the menu. How can I make it change to My Orders instead, redirecting to /my-account/orders/? So basically now it's changing ...
0
votes
0answers
106 views

wp_logout() not working after form submission

I am pretty new to Wordpress, so please forgive me if this sounds like a silly question. I have a Wordpress Page which is using the default page.php template in my theme. I modified the page.php ...
3
votes
4answers
3k views

How change wordpress password without logout ( need for plugin )

I need change WP password without logout profile. When I use wp_set_password( $password, $user_ID ) i have problem with logout.
0
votes
3answers
949 views

How to remove 'wordpress…' text from page titles in tabs

I am working on a site and sometimes I run into an error when logging out and on the site tab it says 'Wordpress Failure Notice'. I am trying to remove all instances of wordpress so users dont know Im ...
0
votes
0answers
28 views

Wordpress Login and Logout issue (Bitnami)

I was having problem with hostgator hosting service so I am trying to move my website to google cloud platform. I installed a wordpress website (Bitnami) and there is an issue I don't understand. ...
4
votes
1answer
2k views

WordPress failure when logging out

I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link ...
1
vote
1answer
144 views

How would I hook into `clear_auth_cookie` to return the user's ID that's currently being logged out?

clear_auth_cookie is what I'd need in order to catch the actual logout action, but I can't get it to return anything. https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/pluggable.php#...
0
votes
2answers
2k views

Set Short Automatic Logout Time for One User

I am building sites where I secretly give authoring role capability to visitors by auto-logging them into a generic account; they never see the admin bar, and are prevented from seeing the dashboard (...
0
votes
1answer
338 views

Logout redirects to default page

New to wordpress and not a php developer, but I'm currently having an issue with a user being redirected to a default wordpress page and being asked to confirm if the user wants to log out twice. I ...
3
votes
1answer
2k views

How to log out everywhere else, destroy all sessions “all other devices”?

WordPress panel service "log out everywhere else" is doing a nice job. I want to use this as a function outside the panel. Screenshoot
0
votes
1answer
168 views

Why deleting/removing cookies in WordPress does not log me out from admin?

I am really curious and I haven't found satisfactory answer in similar questions. When deleting all of my cookies, I am still perfectly able to access my admin dashboard - why am I not returned back ...
0
votes
0answers
740 views

Changing the WP login session cookie time?

As i know, WordPress makes login session cookie expire in 48 hours or on browser close. And in 14 days, if we check the "Remember Me". I want to change this time to 5 seconds: function ...
0
votes
1answer
437 views

How to Show Different Menus to Logged in Users in WordPress [duplicate]

how to write code for this requirement and i want to show menus only in header menu with different menus to logged users
0
votes
1answer
82 views

add the user name to menu when user is logged in [closed]

i have this code but its not working it throws syntax error, unexpected '}' error function my_custom_menu_item($items, $args) { if(is_user_logged_in() && $args->theme_location == '...
1
vote
1answer
192 views

Update user meta on logout

I have seen some answers, but the questions are quite a number of years old, and the after trying their responses I've not been able to get it to work. I need to update user meta data during the ...
5
votes
4answers
9k views

Logout redirect to current page - function

I'm looking for a function that can redirect users when they logout to the current page. I'm looking for a code I can use in functions.php?
4
votes
3answers
1k views

Change “You are now logged out” text

I want to wrap <strong></strong> around the words "logged out": add_filter( 'gettext', 'wpse17709_gettext', 10, 2 ); function wpse17709_gettext( $custom_translation, $login_texts ) { ...
0
votes
1answer
1k views

Logout Redirect and also WP-login.php Redirect

I am not very advanced in php. I have this function that prevents wp-login.php access with redirection add_action('init','custom_login'); function custom_login(){ global $pagenow; if( 'wp-login.php' ...
0
votes
3answers
9k views

How to redirect logged out users to specific page?

I have a question and a technical issue in wordpress. That is, i have a login form on my website to allow visitors to login to see special content. The question goes here, when the time they log in, i ...
1
vote
3answers
3k views

add logout button on admin side menu

I want to add a logout button on the side admin menu (because I disable the admin bar for the users). So I thought add_menu_page() is the way to do it, but how to add the link to the regarded function?...
0
votes
1answer
86 views

Redirection of wp-login.php results in non working of Logout process

I want to create Custom Login, Registration, Password Reset & Logout Page. For that I have added following code in my function.php file. function custom_login_page() { $new_login_page_url = ...
0
votes
1answer
56 views

WordPress session times out - but doesn't log out?

Since migrating our WordPress site to a new webserver, we have had issues where users are apparently getting logged out...but yet aren't. What I mean is, on our old server, users would sometimes get ...
2
votes
1answer
1k views

Logout issue with new Domain on WP Multisite

I'm using a multisite and I set my site up at parentsite.com/mysite. When the logout button was clicked it worked correctly and logged the users out and brought them back to the homepage. Here's what ...
0
votes
0answers
50 views

wp_logout_url($uri) having two redirect values

$uri= $_SERVER['REQUEST_URI']; wp_logout_url($uri) having two redirect values like this http://localhost/sarkari/wp-login.php?action=logout&redirect_to=%2Fsarkari%2F&_wpnonce=b5e3b954df&...
2
votes
2answers
383 views

Logout via Subdomain, non-wordpress page on a different server?

Similar to the question over at Get wp_logout_url function to work on external (non-Wordpress) page The problem I am facing is the fact the subdomain is on a different server so I am unable to ...
1
vote
2answers
212 views

Is there any way to check for user login and send him to login?

I have written a plugin for my own site where I have an issue like "after user login to the site if he logout then again if he clicks on browser back button then the previous page showing again ...
-1
votes
1answer
2k views

Need edit profile link in the menu for logged in users

I have a page called edit profile, i have installed the profile builder plugin,so the users can edit their profile from front end, if the user is logged in i want to show the edit profile and logout ...
1
vote
2answers
1k views

wp_logout not redirecting using wp_logout_url() and wp_redirect()

I have written this function for loggin user out. The user is loggin out but not redirecting to the page instead goes to home page which default logout Url. i have tried wp_logout_url() and also ...
1
vote
1answer
2k views

Logout using link (without nonce)

This question comes from an absolute non-coder - and has been asked in various forms several times befor (e.g. here). To logout properly the URL that triggers it needs a nonce as e.g.: http://xyz/...
0
votes
0answers
343 views

Wordpress Ajax Logout

I am trying to upgrade one plugin. Can someone help me with creating a seamless logout procedure from wordpress? I want a logged in user to click on a link/button in a widget in sidebar. This link ...
4
votes
1answer
5k views

Masking logout URL

The primary goal is to hide that the site is driven by wordpress. I've got the login part all locked up, but the logout URL still has those blasted wp delineators that give away it's a wordpress site. ...
0
votes
1answer
435 views

login logout menu changes in wordpress [closed]

I am new to wordpress ,i use login and logout in my site,i already create pages for login , logout and register ,i wants to create 2 menu in navigation bar . one for register and another one for login ...
0
votes
1answer
101 views

get_permalink not fetching correct pages

I am developing a WP site locally on Xampp. I am using the following code to add a styled login/out button to the sidebar: add_shortcode( 'my_login', 'my_login' ); function my_login() { if (...
11
votes
1answer
11k views

How reduce wordpress login session timeout time?

I want to logout user autometically when user is idle for more than 10 minutes.That mean suppose user is logged in to a site and user didn't browse any pages for more than 10 mins.when he browse any ...
2
votes
2answers
2k views

wp_logout action not working

I'm trying to remove some cookies set to control persistent login when the user specifically wants to log out of a website. I thought it would be as simple as: function remove_user_cookie() { ...
1
vote
2answers
3k views

Deleting cookie to logout

Would be potential problems if I delete wordpress_logged_in_47d1523b... cookie using javascript? Is there something additional that wp_logout does?
1
vote
2answers
10k views

How do you log a user out with wp_logout?

I can get wp_logout to work, but not without generating lots of warnings ('PHP warning: Cannot modify header information - headers already sent'). wp_logout calls wp_clear_auth_cookie, which calls ...
4
votes
2answers
339 views

Logout URL performing strange

When I enter url : http://www.example.com/wp-login.php?action=logout it asks if you want to log out or not ? why does it happen where I am not logged in as a admin? If I run this url on any ...