User ID handling upon logout
-
Hi guys,
I am trying to update a meta column each time a user logs out of the site, currently I have the following within my plugin:
add_action('template_redirect', function() { global $current_user; get_currentuserinfo(); $this->bbpis_userID = $current_user->ID; }, 10 ); add_action('template_redirect', array( $this, 'bbpis_whosonline_update' ), 10 ); add_action('clear_auth_cookie', array( $this, 'bbpis_useroffline' ), 10 );There is a problem however, the user id gets destroyed when the user goes through the logout process.
Does anyone know of a way I can use to resolve this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘User ID handling upon logout’ is closed to new replies.