Changeset 5442 for trunk/src/includes/users/capabilities.php
- Timestamp:
- 07/11/2014 09:54:15 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/users/capabilities.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/capabilities.php
r5436 r5442 63 63 64 64 // User exists 65 if ( ! empty( $user ) ) {65 if ( ! empty( $user ) ) { 66 66 67 67 // Get users forum role … … 81 81 82 82 // Add the new role 83 if ( ! empty( $new_role ) ) {83 if ( ! empty( $new_role ) ) { 84 84 85 85 // Make sure bbPress roles are added … … 128 128 // smart, but since roles aren't exactly hierarchical, and bbPress 129 129 // does not yet have a UI for multiple user roles, it's fine for now. 130 if ( ! empty( $roles ) ) {130 if ( ! empty( $roles ) ) { 131 131 $role = array_shift( $roles ); 132 132 } … … 161 161 162 162 // Look for a non bbPress role 163 $roles = array_intersect(163 $roles = array_intersect( 164 164 array_values( $user->roles ), 165 165 array_keys( bbp_get_blog_roles() ) … … 169 169 // smart, but since roles aren't exactly hierarchical, and WordPress 170 170 // does not yet have a UI for multiple user roles, it's fine for now. 171 if ( ! empty( $roles ) ) {171 if ( ! empty( $roles ) ) { 172 172 $role = array_shift( $roles ); 173 173 } … … 371 371 372 372 // Check if spam 373 } elseif ( ! empty( $user->spam ) ) {373 } elseif ( ! empty( $user->spam ) ) { 374 374 $is_spammer = true; 375 375 } … … 405 405 406 406 // Use displayed user if it's not yourself 407 if ( empty( $user_id ) && bbp_is_single_user() && ! bbp_is_user_home() ) {407 if ( empty( $user_id ) && bbp_is_single_user() && ! bbp_is_user_home() ) { 408 408 $user_id = bbp_get_displayed_user_id(); 409 409 } … … 444 444 445 445 // Loop through posts and spam them 446 if ( ! empty( $posts ) ) {446 if ( ! empty( $posts ) ) { 447 447 foreach ( $posts as $post_id ) { 448 448 … … 496 496 497 497 // Use displayed user if it's not yourself 498 if ( empty( $user_id ) && bbp_is_single_user() && ! bbp_is_user_home() ) {498 if ( empty( $user_id ) && bbp_is_single_user() && ! bbp_is_user_home() ) { 499 499 $user_id = bbp_get_displayed_user_id(); 500 500 } … … 535 535 536 536 // Loop through posts and spam them 537 if ( ! empty( $posts ) ) {537 if ( ! empty( $posts ) ) { 538 538 foreach ( $posts as $post_id ) { 539 539 … … 592 592 593 593 // Check if deleted 594 } elseif ( ! empty( $user->deleted ) ) {594 } elseif ( ! empty( $user->deleted ) ) { 595 595 $is_deleted = true; 596 596 } … … 663 663 664 664 // Return the inverse of active 665 return ! bbp_is_user_active( $user_id );665 return ! bbp_is_user_active( $user_id ); 666 666 } 667 667
Note: See TracChangeset
for help on using the changeset viewer.