How to display users’ sessions warning messages notice on custom WordPress login pages

You are here:

The WP Activity Log plugin can display warning messages on the WordPress login page. It does so when a user’s session is blocked because no simultaneous sessions are allowed. These warning messages work out of the box.

However, if you are using a custom WordPress login page these warning messages might not display correctly. This document explains how to use the hooks in the plugin to display the warning messages on custom WordPress login pages.

What warning message does WP Activity Log display on the login page?

The WP Activity Log plugin can display two different warning messages on the WordPress login page:

User’s Session is blocked

When you block multiple sessions for the same user on WordPress, the plugin shows the below message when someone tries to login with a user that already has a session.

WordPress user login blocked with warning

This warning message can be edited from the plugin’s settings.

User’s Session is blocked but can use an override password

When you allow blocked users sessions to override existing ones with a password the plugin shows a warning message and adds a password placeholder.

WordPress logged in session override

How to display the plugin warning messages on your custom WordPress login page

You can use a number of hooks in the WP Activity Log plugin to capture and display these warning messages on your WordPress custom login page. The hooks are:

  • wsal_override_session_block_message
  • wsal_override_session_password_field
  • wsal_override_session_password_field_tags

Refer to the list of WordPress login page hooks for all the documentation and example code on how to use these hooks.