Reputation::delete_user( integer $user_id )
Description #
Delete all reputation of user when user get deleted.
Parameters #
- $user_idinteger (Required) User ID.
Source #
File: addons/reputation/reputation.php
public function delete_user( $user_id ) { global $wpdb; $delete = $wpdb->delete( $wpdb->ap_reputations, array( 'rep_user_id' => $user_id ), array( '%d' ) ); // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching if ( false !== $delete ) { do_action( 'ap_bulk_delete_reputations_of_user', $user_id ); } }
Expand full source code Collapse full source code View on GitHub: addons/reputation/reputation.php:427
Add your comment