Questions tagged [logout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

What is the benefit of logout using an nonce?

I get the purpose of nonce in general, but It seems like this particular action would be safe without an nonce. What benefit does it bring?
0
votes
2answers
61 views

logging out with/without confirmation - single site, multisite

I have two wordpress installations: a single one and a multisite with subdirectories. On both my users can logout with the url: [URL to]/wp-login.php?action=logout&redirect_to=%2Fmydir%2F&...
0
votes
1answer
824 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
0answers
21 views

How to add Loginout to Sub-menu

I've been searching all over the interwebs for this one. I've got the code snippets to add Loginout to a menu as a main menu item. I'm now looking to understand how to attach it to a sub-menu. This is ...
1
vote
1answer
883 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 ...
0
votes
1answer
748 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() ){ ...
0
votes
0answers
18 views

Problem with ajax login/logout and nonces

My current flow is as follows: I use wp_localize_script to generate a nonce which my javascript can use. I pass this nonce with my login and logout request. When I login I touch the dom by removing ...
0
votes
2answers
2k 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 ...
0
votes
1answer
38 views

Logout after clicking URL link results in “headers already sent” error

Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\wordpress\wp-includes\formatting.php:5688) in D:\xampp\htdocs\wordpress\wp-includes\pluggable.php ...
0
votes
1answer
621 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
526 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 ...
0
votes
0answers
26 views

Unable to update plugins or log out

The server my site was hosted on recently went down and someone else was able to fix it for me. I am unclear on what exactly the issues with the server were, but since the site came back up, my cron ...
0
votes
2answers
17 views

How to redirect returning users who previously logged in?

There are many answers to how to redirect after login. But my situation is different. In my scenario, we have a landing page where people can login. Once logged in, the users are not logged out for a ...
0
votes
0answers
29 views

How to make Logout Link consistently appear on all web pages?

I am using the following code to add Log In and Log Out links in the Primary Menu. Can't give a web link because the site is still under construction. //* Add a Login/Logout toggle item in WordPress ...
4
votes
5answers
5k 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.
1
vote
2answers
55 views

Hook to change Logout url

I used this hook to replace the exit address . Now, unfortunately, this hook does not work and I can not understand why add_filter('logout_url', 'my_custom_logout_url'); function ...
0
votes
0answers
18 views

What is the function that sets login cookies on WordPress?

I tried to look for everything on Google but I had little luck. I created a login and registration form on the same page before making a purchase if you are not logged in. To log in, use the ...
0
votes
0answers
31 views

Reset cookie for login, register and logout

I would like to better understand how WordPress login / logout cookies work. In my case I have a page that allows you to perform various operations. To see if the user is not logged in I perform the ...
2
votes
1answer
97 views

Logout redirects to a broken page(home URL is omitted)

I'm using the latest version of WP. I have a problem, where clicking the logout button from the admin panel redirects to a completely broken link: http://wp-login.php/?loggedout=true As you can ...
0
votes
1answer
45 views

Logout all users at particular time

How can I logout all users in wordpress at specific time? I tried to create a hook and used WP Control plugin but it did not worked for me
0
votes
1answer
35 views

What is the link to log out on Wordpress?

I have a custom login form that takes the code from wp-login.php. I can't use wp-login.php because when this file is used I refer them to my main login file, ie login.php. Is there therefore a link ...
2
votes
1answer
2k views

Custom Connect to Facebook, problem logging in/logging out

I am working on a custom function for login in my users via facebook. I started by reading this nice tutorial on how to login in via Facebook: http://digitalzoomstudio.net/2013/02/09/tutorial-how-to-...
1
vote
1answer
3k 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/...
1
vote
1answer
25 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
1answer
19 views

Automatically Log Out UserX when visiting WooCommerceStore

I developed a Web-Plattform, and Users Log into a DemoUser in order to Check-Out the Dashboard functionality. Now the problem is, that once they are happy with what they see and visit the ...
13
votes
4answers
63k 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 ...
3
votes
2answers
7k views

wp_logout Not Logging Me Out

Here is what I'm doing: wp_logout(); var_dump(is_user_logged_in()); var_dump returns: bool(true) Why is wp_logout() not logging me out?
0
votes
1answer
72 views

Logout user if click on a custom page link

I want to logout a user if the user click on custom page link (e.g. example.com/logout). I need to do that because my site users are not allowed to access wp-login.php page. I've a front-end login ...
0
votes
1answer
26 views

Change Login or Logout text based on status

I'm trying to display text in a button in the header that says "LOG IN" or "LOG OUT" depending on the visitor's status. The button calls a slider action, so I just need to change the text displayed on ...
0
votes
1answer
148 views

Woocommerce - auto logout after payment

I need to automatically logout user/customer after payment, every time that a customer or user close browser, he auto logout
2
votes
1answer
114 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
17 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 ...
6
votes
1answer
10k 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 ...
6
votes
4answers
11k 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 ...
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
29 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
213 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 ...
0
votes
3answers
1k 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 ...
4
votes
1answer
3k 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
412 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 (...
2
votes
1answer
3k 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
210 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
1answer
757 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
121 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
327 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
10k 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?
3
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
2k 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 ...