Skip to:
Content

BuddyPress.org

Changeset 6049


Ignore:
Timestamp:
05/27/2012 04:25:29 PM (12 years ago)
Author:
boonebgorges
Message:

On WP Single, always generate activation key

When 'bp_core_signup_send_activation_key' is filtered to false, an activation
key should still be generated, otherwise the newly created user will be unable
to activate her account. This changeset ensures that the activation key is
generated, even if a plugin is preventing the key from being sent via email.

Fixes #4218

File:
1 edited

Legend:

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

    r6020 r6049  
    10971097
    10981098    /***
    1099      * Now generate an activation key and send an email to the user so they can activate their account
    1100      * and validate their email address. Multisite installs send their own email, so this is only for single blog installs.
     1099     * Now generate an activation key and send an email to the user so they can activate their
     1100     * account and validate their email address. Multisite installs send their own email, so
     1101     * this is only for single blog installs.
    11011102     *
    1102      * To disable sending activation emails you can user the filter 'bp_core_signup_send_activation_key' and return false.
     1103     * To disable sending activation emails you can user the filter
     1104     * 'bp_core_signup_send_activation_key' and return false. Note that this will only disable
     1105     * the email - a key will still be generated, and the account must still be activated
     1106     * before use.
    11031107     */
    1104     if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) {
    1105         if ( !is_multisite() ) {
    1106             $activation_key = wp_hash( $user_id );
    1107             update_user_meta( $user_id, 'activation_key', $activation_key );
     1108    if ( !is_multisite() ) {
     1109        $activation_key = wp_hash( $user_id );
     1110        update_user_meta( $user_id, 'activation_key', $activation_key );
     1111
     1112        if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) {
    11081113            bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key );
    11091114        }
Note: See TracChangeset for help on using the changeset viewer.