Changeset 13125 for trunk/src/bp-members/bp-members-invitations.php
- Timestamp:
- 10/10/2021 11:46:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-invitations.php
r13105 r13125 126 126 $key = bp_get_user_meta( $user_id, 'activation_key', true ); 127 127 if ( $key ) { 128 $redirect = bp_get_activation_page(); 129 128 130 /** 129 131 * Filters the activation signup. … … 138 140 // If there were errors, add a message and redirect. 139 141 if ( ! empty( $user->errors ) ) { 142 /** 143 * Filter here to redirect the User to a different URL than the activation page. 144 * 145 * @since 10.0.0 146 * 147 * @param string $redirect The URL to use to redirect the user. 148 * @param WP_Error $user The WP Error object. 149 */ 150 $redirect = apply_filters( 'bp_members_invitations_activation_errored_redirect', $redirect, $user ); 151 140 152 bp_core_add_message( $user->get_error_message(), 'error' ); 141 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ));153 bp_core_redirect( $redirect ); 142 154 } 143 155 156 /** 157 * Filter here to redirect the User to a different URL than the activation page. 158 * 159 * @since 10.0.0 160 * 161 * @param string $redirect The URL to use to redirect the user. 162 */ 163 $redirect = apply_filters( 'bp_members_invitations_activation_successed_redirect', $redirect ); 164 144 165 bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) ); 145 bp_core_redirect( add_query_arg( 'activated', '1', bp_get_activation_page()) );166 bp_core_redirect( add_query_arg( 'activated', '1', $redirect ) ); 146 167 } 147 168 }
Note: See TracChangeset
for help on using the changeset viewer.