Hi Ryan, where are you trying to use this?
Let us know the steps etc. to reproduce so we can try it on our end.
Thanks for the reply,
I tied to add the %USERNAME% in the Global Login Redirect textbox in the admin area, and when user has logged in, it redirects to the same url as what I have input in the Global Login Redirect, meaning the replacement of the %USERNAME% did not come into place, or was it just me?
works for me, for example:
http://localhost/buddypress/members/%USERNAME%/profile/
make sure you have a valid URL there, if that doesn’t work, try disabling other plugins or even try switching themes temporarily.
http://localhost/buddypress/members/%USERNAME%/profile/
yes, but isn’t it supposed to be the username of the user, not the %USERNAME% itself?
I tried it in my localhost, still the problem persists…
Hi, I think I solved my problem, I went to pluggable.php, and I changed the following:
$user_login = stripslashes($user->user_login);
into
$user_login = stripslashes($current_user->user_login);
and it worked. I don’t know if this is a good workaround or not, but hey, it solved my problem 🙂 thanks for the help also.
I take it back, it’s still not resolved yet.. 🙁
This one I am sure,
I changed the ff:
<?php if( !empty($lwa_data[‘redirect’]) ): ?>
<input type=”hidden” name=”redirect_to” value=”<?php echo esc_url($lwa_data[‘redirect’]); ?>” />
<?php endif; ?>
into
<?php if( !empty($lwa_data[‘lwa_login_redirect’]) ): ?>
<input type=”hidden” name=”redirect_to” value=”<?php echo esc_url($lwa_data[‘login_redirect’]); ?>” />
<?php endif; ?>
I think this is also the problem with the http://0.0.0.1/ login issue.
Regards,
Ryan
Thanks for the suggestion but I don’t think that fix would work for all situations…
Are you using a shortcode here or a widget?
I used the shortcode in a page. I am not able to change the %USERNAME% into the logged in user that’s why I changed some code.
Thanks