Redirect on WP_Error?
-
Hello Buddypress,
I am currently developping a custom theme and I’m running into some problem.
When I run the funciton to check an activation key:
bp_core_activate_signup($KEY)
It doesn’t return the WP_Error class object but it’s redirecting the user and setting a cookie saying that the key is incorrect.
In the function it does say:
if ( empty( $user_id ) ) { return new WP_Error( 'invalid_key', __( 'Invalid activation key', 'buddypress' ) ); }
if I use
die()
infront of the return, it just dies. So it does pass the if statement.Why is it when a WP_Error class object is being created, the browser redirects the user?
I just want the object.
- The topic ‘Redirect on WP_Error?’ is closed to new replies.