Hook Delete User
-
I’ve changed the code of the “delete_user” Hook….
<?php namespace plainview\wordpress\activity_monitor\hooks; /** @brief User deletion. @since 2014-05-04 20:43:14 **/ class delete_user extends user_register { public function get_description() { return 'User deletion.'; } public function log() { // We need special handling for wp_login since the user is not noted in the get_current_user_id function yet. $user = get_userdata( $this->parameters->get( 1 ) ); $this->log_hook->user_id = get_current_user_id(); $this->html()->append( '<em>Login name:</em> %s', $user->data->user_login ); $this->html()->append( '<em>Name:</em> %s %s', $user->first_name,$user->last_name ); $this->html()->append( '<em>Email:</em> %s', $user->data->user_email ); $this->html_and_execute( $this->html() ); } }In your version was the User logged the deleted User. Now the User logged is the current user (who has done the deletion) and the Information of the deleted User is in the description…
If you like you could change it in the standard
Andi
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Hook Delete User’ is closed to new replies.