Changeset 5814 for branches/2.5/includes/core/template-functions.php
- Timestamp:
- 07/13/2015 12:01:59 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/includes/core/template-functions.php
r5262 r5814 160 160 161 161 $content_dir = constant( 'WP_CONTENT_DIR' ); 162 162 163 163 // IIS (Windows) here 164 164 // Replace back slashes with forward slash … … 228 228 229 229 $content_dir = constant( 'WP_CONTENT_DIR' ); 230 230 231 231 // IIS (Windows) here 232 232 // Replace back slashes with forward slash … … 458 458 * 459 459 * @uses get_query_var() To get {@link WP_Query} query var 460 * @uses is_email() To check if the string is an email 461 * @uses get_user_by() To try to get the user by email and nicename 460 * @uses get_user_by() To try to get the user by id or nicename 462 461 * @uses get_userdata() to get the user data 463 462 * @uses current_user_can() To check if the current user can edit the user … … 498 497 $the_user = false; 499 498 500 // If using pretty permalinks, use the email orslug499 // If using pretty permalinks, always use slug 501 500 if ( get_option( 'permalink_structure' ) ) { 502 503 // Email was passed 504 if ( is_email( $bbp_user ) ) { 505 $the_user = get_user_by( 'email', $bbp_user ); 506 507 // Try nicename 508 } else { 509 $the_user = get_user_by( 'slug', $bbp_user ); 510 } 511 } 512 513 // No user found by slug/email, so try the ID if it's numeric 514 if ( empty( $the_user ) && is_numeric( $bbp_user ) ) { 501 $the_user = get_user_by( 'slug', $bbp_user ); 502 503 // If not using pretty permalinks, always use numeric ID 504 } elseif ( is_numeric( $bbp_user ) ) { 515 505 $the_user = get_user_by( 'id', $bbp_user ); 516 506 }
Note: See TracChangeset
for help on using the changeset viewer.