The easiest way is to change the authentication cookie expiry time.
add_filter('auth_cookie_expiration', 'wase_85171_expiry',10,3);
function wase_85171_expiry($expiry, $user_id, $remember) {
return 14400; // or calculate the time remaining till the time you want it to expire
}
People can extend the cookie expiry in the browser, but I don’t believe anyone will bother
Related Posts:
- In Django, how do I know the currently logged-in user?
- Disallow user from editing their own profile information
- wp_signon returns user, but the user is not logged in
- What exactly is ReAuth?
- What are the differences between wp_users and wp_usermeta tables?
- How can I send a welcome email to a user AFTER they login for the first time?
- Can not login with correct username and password
- How to remove the WordPress logo from login and register page?
- Stop users from logging in from multiple locations
- My login form does not work
- Cookie settings for session across WPML subdomains using custom AJAX login
- Change Login Page for a Multisite Subsite
- Change admin login URL
- Is there a way to remove wp-login.php alias (login)?
- Login with cookie but without using WordPress code
- wp-admin redirecting to wp-login.php
- User Directory without a Plugin
- Get wordpress stored cookies for custom login
- Restrict PDF links
- Can’t access login page after password reset
- Remote REST request to check login status
- How can I test the login for an expired session?
- Rendering of custom walker menu function not working properly
- Force user to login in home page
- How does WordPress handle sessions?
- Change Favicon on Login Screen?
- Customizing the WordPress login form
- How to display username and password after registration
- wp-login gives 404 error, but wp-admin is working fine
- Login error redirecting to wp-login page
- Custom login message for single post pages only
- Private page protected with username and password
- Password protect media attachment – share across guests
- Password reset – Disabled for LDAP accounts
- Replace dash with space in username on login
- Autologin only working the second time
- Completely replacing the login form
- How can I add a login/logout link in the sub-nav of my website?
- Why wp_update_user doesn’t update user_activation_key on users with apostrophes in their email?
- Forgot Password/ Password Reset Page does not exist
- WordPress on Apache behind nginx using letsencypt issue with loginizer/limit login attempts
- Auto login between word press subdomain and a .net website
- Custom Login form from WordPress site to non-WordPress site
- WordPress error on log out ‘Not Permitted’ and can’t log out
- How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
- Changed primary domain and now wordpress login won’t work
- Add logout link when logged in, make it disappear when logged out?
- Keep user session with custom implementation of user login
- Forcing frontend login with UI switch
- Getting a person’s username from a wordpress cookie
- Sidebar login widget with error print, returns an error
- Login without Password
- Exclude login page from custom maintenance code
- Temporarily locked out … how long is a “short while”?
- Change default login auth
- I can’t access my WordPress dashboard – shows Warning message [closed]
- Add html to wp_login_form
- Access log “POST /wp-login.php HTTP/1.0” 400
- Are login functions considered part of the WP backend?
- SQL – Remove All The Users and Create A New User With Admin Role Via PhpMyAdmin
- Can I protect a type of content site-wide with a single password?
- Sign in with social media accounts without creating a WP account [closed]
- WordPress login form script
- WordPress authentication using custom php?
- what is the best and safest way to allow users to register to site
- ERROR: Cookies are blocked due to unexpected output (no FTP access)
- Sharing a logged in session with a custom subdmain site?
- How do I change the language of the login page to Arabic?
- MAMP localhost wordpress site, not possible to sign in, username and password are correct
- Login issues wordpress page
- How to post frontend login form to a different authentication script from wp-login?
- Make WordPress User Name be the Company Name when Registering (not the default ‘first name’ last name’ email address’)
- Why do I have a reauth=1 redirection loop when I try to log in to WordPress hosted on AWS Fargate?
- Login form does not store/remember/suggest users password
- Problem with is_user_logged_in() function in some pages
- Confused – can’t access wordpress dashboard or site that has been published
- wordpress login loop and session problem
- Recovering log in information
- unable to Login to Admin
- WordPress login loop on proxy setup with SSL – Apache proxy to IIS
- ERROR: Cookies are blocked due to unexpected output – ultimate solution
- Android app – can’t login: “This site already exists in the app, you can’t add it”
- Fatal error: Call to undefined function get_plugin_data()
- backend access per user status
- Make WordPress User Name the Email Address When Register
- Users redirected to old site
- WordPress Login / SSL = Code Question
- Save user login date
- Login with Username (or Code) only
- Enqueue script on logon failure
- I get 404 when I try to login ever since I changed the permalink
- wp_signon gives error insufficient_permissions
- Is there a way to give users the option to log in to their favorite group on login? [closed]
- Logging in takes a few refreshes to show you are logged in, is this a cache issue? [closed]
- Direct access to site when log in
- Can not login after moving to cloudflare and adding rules
- Inconsistent login state
- “user not registered” when trying to login and “There has been a critical error” message on site
- Entire WordPress content disappears
- Remove login link from Reset Password-screen