Changeset 13125 for trunk/src/bp-members/screens/activate.php
- Timestamp:
- 10/10/2021 11:46:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/screens/activate.php
r11927 r13125 86 86 } 87 87 88 $bp = buddypress(); 88 $bp = buddypress(); 89 $redirect = bp_get_activation_page(); 89 90 90 91 /** … … 100 101 // If there were errors, add a message and redirect. 101 102 if ( ! empty( $user->errors ) ) { 103 /** 104 * Filter here to redirect the User to a different URL than the activation page. 105 * 106 * @since 10.0.0 107 * 108 * @param string $redirect The URL to use to redirect the user. 109 * @param WP_Error $user The WP Error object. 110 */ 111 $redirect = apply_filters( 'bp_members_action_activate_errored_redirect', $redirect, $user ); 112 102 113 bp_core_add_message( $user->get_error_message(), 'error' ); 103 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ));114 bp_core_redirect( $redirect ); 104 115 } 105 116 117 /** 118 * Filter here to redirect the User to a different URL than the activation page. 119 * 120 * @since 10.0.0 121 * 122 * @param string $redirect The URL to use to redirect the user. 123 */ 124 $redirect = apply_filters( 'bp_members_action_activate_successed_redirect', $redirect ); 125 106 126 bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) ); 107 bp_core_redirect( add_query_arg( 'activated', '1', bp_get_activation_page()) );127 bp_core_redirect( add_query_arg( 'activated', '1', $redirect ) ); 108 128 109 129 }
Note: See TracChangeset
for help on using the changeset viewer.