I don’t see anything like it in the database, so you probably have to do this yourself. To save the last login time, you can hook into the wp_login
action, and save a user meta value (like [myprefix]_lastlogintime
). You first read this value, so you get the previous login time, save this in the session, and then save the new login time.
On the regular admin pages you check whether this session variable is set. If it is, you display the welcome text and clear the session variable so you don’t display it on every page.
If you want to save the last page visit time you have to write to the database on every (admin) page view. This is possible, but I would not recommend it. You can also save something once on logout (action wp_logout
), but probably not everyone will remember to log out.
Related Posts:
- How can I allow access to multiple users, using the same login, at the same time?
- User can not login
- Multi-site User Sessions
- Change the login button on the login page
- How to update the delete user confirmation form?
- Custom ReCaptcha Login
- What is the proper way to apply the login_form_bottom filter?
- How to override wp-login.php
- Remove Links from Login page
- Modify custom Users Manage page
- How to Save Different Usermeta Fields According to User Role?
- Show newly added posts since last user login time /date
- setting a specific home page for logged in users
- Change “logged in” link in (you must be logged in to post a comment)
- Redirect to requested page after (custom) login
- Associate Page with User
- Set user loggin status?
- Customizing the default logout page of WordPress
- How do I remove the eye icon that shows visibility on login screen and reset password screen
- How can I add data to a custom column in the Users section of the wordpress backend?
- Unique User Account Number + Displayed Via Shortcode
- Custom Login and Registration form in Ajax
- Updating Custom WordPress User Meta Field via REST API
- How to pass external variables to the wp_new_user_notification_email filter?
- Creating user relationships
- WordPress custom login page
- Function to allow “Anyone can register”?
- Make custom user table column filterable
- Adding a login form that concatenates three fields into a username
- Add ‘Creator’ User Meta when adding user
- Properly customizing login/register form
- WordPress Locale Switching on Accept-Language Header
- Follow me for WordPress blogs (multi-authors)
- Change the Labels of Users to Customers in Admin
- How to add an extra variable to login and authenticate it?
- Login/Logout Session Sharing – Multiple WordPress Installations
- Custom login with external provider iframe and data object
- Deep customization of wp-login.php
- Allow guests to use WP Customizer but disable save button
- Lost password empty field error redirect to custom login
- Users can only view their content from the front end
- Custom Log In Screen – Disable password recovery [duplicate]
- List top 5 authors with most posts
- A truely custom login page?
- Problem with custom user meta field
- Switch between WordPress websites easy for an end user
- Lost password and back to blog in same line
- Customizing Users in Admin Area
- I w’d like to know If there are simple solutions to integrate other CMSs to wordpress
- how to make a custom field readonly or disabled by user role?
- How to make wordpress use a non-wordpress users table?
- Delete a user from frontend
- Restrict content access to logged in users
- Custom login and registration forms
- loginout function customization
- URL and Site title outputting on Login page
- Is it possible to integrate a custom login feature with wordpress?
- Personalized Gallery what are my options?
- how or where wordress collect unlogged user session
- How to change the login page without a plugin and not only customizing logo and text around the form?
- Removing “Failed” query argument upon successful login
- Validate user login in php
- No plugin populate user information in to form
- How to block specific user id in custom login form?
- how to change the url rediction of the woocommerce login page of the flatsome theme for my own in wordpress?
- Invitation link to a site in multisite network does not work?
- How to change Login default blue admin color?
- Latest update broke my custom login CSS
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Trouble with custom login page
- Wrap WordPress Login Form in custom Div
- Custom login doesn’t stay
- Check get_post value after wp-admin login
- where can i find the login page in wordpress and add my header to it
- How to display all post from the same current usermeta
- Highlight specific user with custom field value
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Change the functionality of wordpress users module in admin
- Pass the post ID
- Changing starting number of User ID
- Custom search by several options send on form not works
- User registration add user ID?
- How to create functions that affect only a specific user
- Show Site Name on WP login screen
- Create users via PHP
- Use wp_login_form function to login with a custom user table?
- how to manage Session in WordPress using custom login?
- Is it possible assign a secondary existing role to already existing one?
- Redirect all pages to the custom login page except for the registration page
- How to stop login for SPECIFIC users BEFORE a specified date
- User Query Multiple Orderby Clause
- Some data of one custom user profile is erased when I update another custom user profile
- How to Remove Subscribers from the Post Author Drop Down
- Fatal error in wp-admin/customize.php after fresh install due to null $wp_customize
- Extend WordPress Core Classes in OOP Theme?
- Can I integrate wordpress with my current website so I can utilize the wordpress plugins?
- Cannot go to next page on phone but can on computer
- How to hide or remove a custom widget area when empty
- Best way to replace image url with source
- Pull certain WordPress posts on custom CMS instead and 301 wordpress to it?