Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2009 01:24:21 AM (17 years ago)
Author:
apeatling
Message:

Add first revision of new default BuddyPress parent theme. This theme is designed to be extended from with child themes, not used directly. The original default themes from the old two theme system are deprecated, but will remain compatible with 1.1. Still more work to do there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-signup.php

    r1636 r1655  
    1414    if ( function_exists('wp_insert_user') )
    1515        return false;
    16    
     16
     17    /* If signups are disabled, just re-direct */
     18    if ( 'none' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() )
     19        bp_core_redirect( $bp->root_domain );
     20       
    1721    $bp->signup->step = 'request-details';
    1822   
     
    2226        /* Check the nonce */
    2327        check_admin_referer( 'bp_new_signup' );
    24 
     28           
    2529        require_once( ABSPATH . WPINC . '/registration.php' );
    2630       
     
    101105                }
    102106               
     107                /* Store the profile field ID's in usermeta */
     108                $usermeta['profile_field_ids'] = $_POST['signup_profile_field_ids'];
     109               
    103110                /* Hash and store the password */
    104111                $usermeta['password'] = wp_hash_password( $_POST['signup_password'] );
     
    112119               
    113120                $usermeta = apply_filters( 'bp_signup_usermeta', $usermeta );
    114                
    115                 /* Finally, sign up the user */
    116                 wpmu_signup_user( $_POST['signup_username'], $_POST['signup_email'], $usermeta );
     121                               
     122                /* Finally, sign up the user and/or blog*/
     123                if ( isset( $_POST['signup_with_blog'] ) )
     124                    wpmu_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
     125                else
     126                    wpmu_signup_user( $_POST['signup_username'], $_POST['signup_email'], $usermeta );
    117127               
    118128                $bp->signup->step = 'completed-confirmation';
     
    168178
    169179    }
    170 
    171     bp_core_load_template( 'register' );   
     180    bp_core_load_template( 'registration/register' );   
    172181}
    173182add_action( 'wp', 'bp_core_screen_signup', 3 );
     
    195204}
    196205
     206/* Kill the wp-signup.php if custom registration signup templates are present */
     207function bp_core_wpsignup_redirect() {
     208    if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') )
     209        return false;
     210       
     211    if ( file_exists( TEMPLATEPATH . '/registration/register.php' ) || file_exists( TEMPLATEPATH . '/register.php' ) )
     212        die;
     213}
     214add_action( 'signup_header', 'bp_core_wpsignup_redirect' );
     215
    197216
    198217
Note: See TracChangeset for help on using the changeset viewer.