內容簡介
**外掛總結:**
CodeCave Admin Security Auditor 是一個輕量級的外掛,可幫助您通過跟踪和顯示您 WordPress 站點中每個用戶的最後登錄時間來監控用戶活動。
**問題與答案:**
- 使用情景有哪些?
- 監視用戶的參與度和活動
- 辨識不活躍的用戶帳戶
- 進行安全審計和合規性
- 用戶帳戶清理和維護
- 追蹤用戶對您的 WordPress 站點的採用情況
- 這個外掛如何處理隱私和數據?
- 這個外掛將最後登錄時間戳記作為用戶元數據存儲在您的 WordPress 數據庫中。不會將數據發送到外部伺服器。當您刪除外掛時,所有存儲的數據都將自動刪除。
- 如何在程式中存取最後登錄數據?
- 您可以為用戶檢索最後登錄時間戳記:
```php
$auditor = CodeCave_Admin_Security_Auditor::get_instance();
$last_login = $auditor->get_last_login( $user_id );
if ( $last_login ) {
echo '最後登錄時間:' . date( 'Y-m-d H:i:s', $last_login );
} else {
echo '從未登錄';
}
```
- 外掛使用哪些 Hooks 與 Filters?
- 這個外掛使用標準的 WordPress Hooks,目前不提供自定義 Hooks。根據用戶反饋,可能會在未來版本中添加自定義 Hooks。
外掛標籤
開發者團隊
② 後台搜尋「CodeCave Admin Security Auditor」→ 直接安裝(推薦)
原文外掛簡介
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:
Automatically tracks the last login time for all users
Displays last login information in the WordPress admin users table
Sortable last login column for easy user management
Shows “Never” for users who haven’t logged in since plugin installation
Timezone-aware display (uses your WordPress timezone settings)
Clean uninstall – removes all data when plugin is deleted
Translation ready
No configuration needed – works out of the box
Use Cases:
Monitor user engagement and activity
Identify inactive user accounts
Security auditing and compliance
User account cleanup and maintenance
Track user adoption of your WordPress site
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.
Developer Notes
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.
