Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 09:32:04 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Breathing room for cast variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-functions.php

    r5727 r5729  
    724724        return $auth_obj;
    725725
    726     if ( ( is_multisite() && (int)$user->spam ) || 1 == (int)$user->user_status )
     726    if ( ( is_multisite() && (int) $user->spam ) || 1 == (int) $user->user_status )
    727727        return new WP_Error( 'invalid_username', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.', 'buddypress' ) );
    728728    else
     
    825825
    826826    // Merge the arrays together
    827     $merged_names           = array_merge( (array)$filtered_illegal_names, (array)$db_illegal_names );
     827    $merged_names           = array_merge( (array) $filtered_illegal_names, (array) $db_illegal_names );
    828828
    829829    // Remove duplicates
    830     $illegal_names          = array_unique( (array)$merged_names );
     830    $illegal_names          = array_unique( (array) $merged_names );
    831831
    832832    return apply_filters( 'bp_core_illegal_names', $illegal_names );
     
    854854    $illegal_names = get_site_option( 'illegal_names' );
    855855
    856     if ( !validate_username( $user_name ) || in_array( $user_name, (array)$illegal_names ) )
     856    if ( !validate_username( $user_name ) || in_array( $user_name, (array) $illegal_names ) )
    857857        $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
    858858
     
    881881        $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
    882882
    883         if ( in_array( $emaildomain, (array)$limited_email_domains ) == false )
     883        if ( in_array( $emaildomain, (array) $limited_email_domains ) == false )
    884884            $errors->add( 'user_email', __( 'Sorry, that email address is not allowed!', 'buddypress' ) );
    885885    }
     
    942942                $profile_field_ids = explode( ',', $usermeta['profile_field_ids'] );
    943943
    944                 foreach( (array)$profile_field_ids as $field_id ) {
     944                foreach( (array) $profile_field_ids as $field_id ) {
    945945                    if ( empty( $usermeta["field_{$field_id}"] ) )
    946946                        continue;
     
    10011001                $profile_field_ids = explode( ',', $user['meta']['profile_field_ids'] );
    10021002
    1003                 foreach( (array)$profile_field_ids as $field_id ) {
     1003                foreach( (array) $profile_field_ids as $field_id ) {
    10041004                    $current_field = isset( $user['meta']["field_{$field_id}"] ) ? $user['meta']["field_{$field_id}"] : false;
    10051005
Note: See TracChangeset for help on using the changeset viewer.