Title: Hook Delete User
Last modified: August 30, 2016

---

# Hook Delete User

 *  Resolved [websolad](https://wordpress.org/support/users/websolad/)
 * (@websolad)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/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
 * [https://wordpress.org/plugins/plainview-activity-monitor/](https://wordpress.org/plugins/plainview-activity-monitor/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * (@edward_plainview)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/hook-delete-user/#post-6660741)
 * Thanks for this. I will include it in the next version.
 * Activity Monitor development will pick up now.

Viewing 1 replies (of 1 total)

The topic ‘Hook Delete User’ is closed to new replies.

 * ![](https://ps.w.org/plainview-activity-monitor/assets/icon.svg?rev=1347443)
 * [Plainview Activity Monitor](https://wordpress.org/plugins/plainview-activity-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plainview-activity-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plainview-activity-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/plainview-activity-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plainview-activity-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plainview-activity-monitor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/hook-delete-user/#post-6660741)
 * Status: resolved