Reputation::delete_user( integer $user_id )

Description #

Delete all reputation of user when user get deleted.

Parameters #

  • $user_id
    integer (Required) User ID.

Source #

File: addons/reputation/reputation.php

	public function delete_user( $user_id ) {
		global $wpdb;
		$delete = $wpdb->delete( $wpdb->ap_reputations, array( 'repu_user_id' => $user_id ), array( '%d' ) ); // WPCS: db call okay, db cache okay.

		if ( false !== $delete ) {
			do_action( 'ap_bulk_delete_reputations_of_user', $user_id );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment