CodeCave Admin Security Auditor is a lightweight plugin that helps you monitor user activity by tracking and displaying the last login time for each user in your WordPress site.
Features:
Use Cases:
Privacy and Data:
This plugin stores the last login timestamp as user metadata in your WordPress database. No data is sent to external servers. When you uninstall the plugin, all stored data is automatically removed.
Accessing Last Login Data Programmatically:
You can retrieve the last login timestamp for a user:
$auditor = CodeCave_Admin_Security_Auditor::get_instance();
$last_login = $auditor->get_last_login( $user_id );
if ( $last_login ) {
echo 'Last login: ' . date( 'Y-m-d H:i:s', $last_login );
} else {
echo 'Never logged in';
}
Hooks and Filters:
The plugin uses standard WordPress hooks and does not currently provide custom hooks. This may be added in future versions based on user feedback.