Hi, i saw your tutorial https://buddydev.com/buddypress-tutorial-redirect-user-first-login/
this would redirect to the profile.
what change would need to be made in this snippet if i want to redirect to prompt the user to fill the xprofile fields in “/profile/edit/group/2/”
thanks!
Hi Vivek,
You can change this$redirect_to = bp_core_get_user_domain($user->ID );
To
$redirect_to = bp_core_get_user_domain($user->ID ) .'profile/edit/group/2/;
Regards
BrajeshThanks Brajesh,
However, getting a fatal error on the snippet given in the tutorial.
The code snippet you are trying to save produced a fatal error on line 22:
syntax error, unexpected ‘login_redirect’ (T_STRING)
Could you please advise if im doing something wrong?
thanks,
VivekHi Vivek,
I am sorry, There was an issue with the previous code. It should be$redirect_to = bp_core_get_user_domain($user->ID ) .'profile/edit/group/2/';
I had missed the last single quote.
Regards
BrajeshHi Vivek,
Are you using any other plugin that provides activation redirect or login redirect(like our auto activate auto login plugin?)Regards
BrajeshIt works. My mistake- there was a conflicting setting in theme for redirect after login.
thanks!
The topic ‘ [Resolved] Redirect on first login – xprofile’ is closed to new replies.