Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/13/2014 12:58:28 AM (13 years ago)
Author:
imath
Message:

Introduce Sign Ups Management

In Users Administration Screen, a new view is now available to manage the pending accounts of a site or of the network of sites. The following actions are supported:

  • Resend the activation email
  • Delete the pending account
  • Activate the pending account

The corresponding bulk actions are also supported. A search box is available in order to let the administrator easily find some specific pending accounts.

The registration process have also been modified so that multisite and regular configs handles it in a similar way. A mechnanism is in place to ensure plugin backward compatibility concerning the regular configs.

See #5374

props boonebgorges, imath

Fixes #4651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-schema.php

    r7860 r8119  
    5151        if ( !empty( $active_components['blogs'] ) )
    5252                bp_core_install_blog_tracking();
     53
     54        // Install the signups table
     55        if ( bp_get_signup_allowed() )
     56                bp_core_install_signups();
     57
    5358}
    5459
    … …  
    344349        dbDelta( $sql );
    345350}
     351
     352/**
     353 * Install the signups table.
     354 *
     355 * @since BuddyPress (2.0.0)
     356 *
     357 * @global $wpdb
     358 * @uses wp_get_db_schema() to get WordPress ms_global schema
     359 */
     360function bp_core_install_signups() {
     361        global $wpdb;
     362
     363        // Multisite installations already have the signups table
     364        if ( ! empty( $wpdb->signups ) ) {
     365                return;
     366        }
     367
     368        $wpdb->signups = bp_core_get_table_prefix() . 'signups';
     369
     370        // Setting the charset to be sure WordPress upgrade.php is loaded
     371        $charset_collate = bp_core_set_charset();
     372
     373        // Use WP's core CREATE TABLE query
     374        $create_queries = wp_get_db_schema( 'ms_global' );
     375
     376        if ( ! is_array( $create_queries ) ) {
     377                $create_queries = explode( ';', $create_queries );
     378                $create_queries = array_filter( $create_queries );
     379        }
     380
     381        // Filter out all the queries except wp_signups
     382        foreach ( $create_queries as $key => $query ) {
     383                if ( preg_match( "|CREATE TABLE ([^ ]*)|", $query, $matches ) ) {
     384                        if ( $wpdb->signups != trim( $matches[1], '`' ) ) {
     385                                unset( $create_queries[ $key ] );
     386                        }
     387                }
     388        }
     389
     390        if ( ! empty( $create_queries ) ) {
     391                dbDelta( $create_queries );
     392        }
     393}
Note: See TracChangeset for help on using the changeset viewer.