Title: Fatal error when using user switching
Last modified: May 3, 2023

---

# Fatal error when using user switching

 *  Resolved [faridjc](https://wordpress.org/support/users/faridjc/)
 * (@faridjc)
 * [3 years ago](https://wordpress.org/support/topic/fatal-error-when-using-user-switching/)
 * When having the WP Activity Log plugin activated, and switch users using User
   Switching plugin I get this fatal error:
 *     ```wp-block-code
       Fatal error: Uncaught TypeError: call_user_func_array():
       Argument #1 ($callback) must be a valid callback, non-static method 
       WSAL\WP_Sensors\WP_Log_In_Out_Sensor::user_switched_event() cannot be called statically
       ```
   
 * WP 6.2
 * User Switching 1.7
 * WP Activity Log 4.5.0
 * PHP 8.0.22
 * Tested on a clean installation with only those two plugins active.
 * The error is not thrown on PHP 7.3.5
 * The error is not thrown on WP Activity Log 4.4.3.2

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [3 years ago](https://wordpress.org/support/topic/fatal-error-when-using-user-switching/#post-16709269)
 * Thank you for using our plugin.
 * I am sorry to read about your issue. Just to confirm, is this the plugin that
   you are using?
 * [https://wordpress.org/plugins/user-switching/](https://wordpress.org/plugins/user-switching/)
 * Or is it another one?
 * Looking forward to hearing from you.
 *  Thread Starter [faridjc](https://wordpress.org/support/users/faridjc/)
 * (@faridjc)
 * [3 years ago](https://wordpress.org/support/topic/fatal-error-when-using-user-switching/#post-16712131)
 * Hello Robert, thanks for your reply. Yes, that’s the one.
 *  Plugin Support [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [3 years ago](https://wordpress.org/support/topic/fatal-error-when-using-user-switching/#post-16713038)
 * Thank you for the confirmation. We can confirm the issue and we will include 
   a fix in the upcoming maintenance update, which we will release some time next
   week.
 * Should there be anything else we can help you with, please do not hesitate to
   ask.
 * Thank you again for using our plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal error when using user switching’ is closed to new replies.

 * ![](https://ps.w.org/wp-security-audit-log/assets/icon-256x256.png?rev=2961534)
 * [WP Activity Log](https://wordpress.org/plugins/wp-security-audit-log/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-security-audit-log/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-security-audit-log/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-security-audit-log/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-security-audit-log/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-security-audit-log/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [robertabela](https://wordpress.org/support/users/robert681/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/fatal-error-when-using-user-switching/#post-16713038)
 * Status: resolved