Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: put some conditions and redirection upon login


shaisimchi
Participant

@shaisimchi

Hi – doesnt seem to work for me or im doing something wrong:
here is kind of what i am doing:

function bp_redirect_to_page()
{
$redirect_url_1 = ‘URL x’;
$redirect_url_2 = ‘URL y’;

get some DB values from wp_bp_xprofile_data

if condition==x
bp_core_redirect($redirect_url_1);
else
bp_core_redirect($redirect_url_2);
}
/*Add an action to redirect user after login*/
add_action(“wp_login”,”bp_redirect_to_page”,100,0);

this doesnt seem to change anything.
any other tips or why this is not working?

Skip to toolbar