Changeset 4222 for trunk/bbp-includes/bbp-user-functions.php
- Timestamp:
- 09/17/2012 12:03:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbp-includes/bbp-user-functions.php
r4196 r4222 934 934 $edit_user = edit_user( $user_id ); 935 935 936 // Either reset caps for role 937 if ( ! empty( $_POST['bbp-default-caps'] ) ) { 938 bbp_reset_user_caps( $user_id ); 939 940 // Or set caps individually 941 } else { 942 bbp_save_user_caps( $user_id ); 943 } 944 936 945 // Error(s) editng the user, so copy them into the global 937 946 if ( is_wp_error( $edit_user ) ) { … … 1336 1345 1337 1346 /** 1338 * Checks if user is a bozo.1339 *1340 * @since bbPress (r4169)1341 *1342 * @uses is_user_logged_in() To check if user is logged in1343 * @uses bbp_get_displayed_user_id() To get current user ID1344 * @uses bbp_is_user_active() To check if user is active1345 *1346 * @param int $user_id The user ID to check. Defaults to current user ID1347 * @return bool True if inactive, false if active1348 */1349 function bbp_is_user_bozo( $user_id = 0 ) {1350 1351 // Default to current user1352 if ( empty( $user_id ) && is_user_logged_in() )1353 $user_id = bbp_get_current_user_id();1354 1355 // Anonymous users are not bozos1356 if ( empty( $user_id ) )1357 return false;1358 1359 // Return if a user has the bozo capability1360 return (bool) apply_filters( 'bbp_is_user_bozo', user_can( $user_id, 'bozo' ), $user_id );1361 }1362 1363 /**1364 1347 * Return a user's main role 1365 1348 *
Note: See TracChangeset
for help on using the changeset viewer.