Changeset 7562
- Timestamp:
- 11/12/2013 03:14:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-actions.php
r7228 r7562 25 25 */ 26 26 function bp_core_action_set_spammer_status( $user_id = 0 ) { 27 28 // Only super admins can currently spam users (but they can't spam 29 // themselves) 30 if ( ! is_super_admin() || bp_is_my_profile() ) { 31 return; 32 } 27 33 28 34 // Use displayed user if it's not yourself -
trunk/bp-members/bp-members-functions.php
r7515 r7562 534 534 535 535 /** 536 * Processes a spammed or unspammed user 537 * 538 * This function is called in three ways: 539 * - in bp_settings_action_capabilities() (from the front-end) 540 * - by bp_core_mark_user_spam_admin() (from wp-admin) 541 * - bp_core_mark_user_ham_admin() (from wp-admin) 542 * 543 * @since BuddyPress (1.6) 544 * 545 * @param int $user_id The user being spammed/hammed 546 * @param string $status 'spam' if being marked as spam, 'ham' otherwise 536 * Process a spammed or unspammed user. 537 * 538 * This function is called from three places: 539 * 540 * - in bp_settings_action_capabilities() (from the front-end) 541 * - by bp_core_mark_user_spam_admin() (from wp-admin) 542 * - bp_core_mark_user_ham_admin() (from wp-admin) 543 * 544 * @since BuddyPress (1.6.0) 545 * 546 * @param int $user_id The ID of the user being spammed/hammed. 547 * @param string $status 'spam' if being marked as spam, 'ham' otherwise. 547 548 */ 548 549 function bp_core_process_spammer_status( $user_id, $status ) { 549 550 global $wpdb; 550 551 // Only super admins can currently spam users552 if ( !is_super_admin() || bp_is_my_profile() )553 return;554 551 555 552 // Bail if no user ID -
trunk/bp-settings/bp-settings-actions.php
r7228 r7562 279 279 } 280 280 281 // Only super admins can currently spam users (but they can't spam 282 // themselves) 283 if ( ! is_super_admin() || bp_is_my_profile() ) { 284 return; 285 } 286 281 287 // Nonce check 282 288 check_admin_referer( 'capabilities' );
Note: See TracChangeset
for help on using the changeset viewer.