Changeset 11766 for trunk/src/bp-members/bp-members-screens.php
- Timestamp:
- 12/12/2017 02:26:15 AM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-members/bp-members-screens.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-screens.php
r11360 r11766 291 291 * 292 292 * @since 1.1.0 293 *294 * @todo Move the actual activation process into an action in bp-members-actions.php295 293 */ 296 294 function bp_core_screen_activation() { … … 326 324 } 327 325 328 // Grab the key (the old way).329 $key = isset( $_GET['key'] ) ? $_GET['key'] : '';330 331 // Grab the key (the new way).332 if ( empty( $key ) ) {333 $key = bp_current_action();334 }335 336 326 // Get BuddyPress. 337 327 $bp = buddypress(); 338 339 // We've got a key; let's attempt to activate the signup.340 if ( ! empty( $key ) ) {341 342 /**343 * Filters the activation signup.344 *345 * @since 1.1.0346 *347 * @param bool|int $value Value returned by activation.348 * Integer on success, boolean on failure.349 */350 $user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $key ) );351 352 // If there were errors, add a message and redirect.353 if ( ! empty( $user->errors ) ) {354 bp_core_add_message( $user->get_error_message(), 'error' );355 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ) );356 }357 358 bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) );359 $bp->activation_complete = true;360 }361 328 362 329 /**
Note: See TracChangeset
for help on using the changeset viewer.