Forum Replies Created
-
Cheers @henrywright,
I tweaked it a bit and came up with this, which does what I want it to do. It was the conditional not for bp_is_my_profile() I was missing, for future readers.
function redirect_members_page() { if ( is_page('members') && ! bp_is_my_profile() ) { $user = get_userdata( get_current_user_id() ); wp_redirect( home_url() . '/members/' . $user->user_login ); exit; } } add_action( 'template_redirect', 'redirect_members_page' );Bridie
In reply to: [Resolved] Auto-generate password & name?I know this is an old post but I searched and searched for a solution to this and finally found one today, so will repost here for others. The solution does require installing Gravity Forms, and then you also need to install the GF User Registration Add-On (check the Add-On item in your Forms dashboard menu). Create a registration form with Gravity Forms, then add a User registration feed, and not only can you opt for automatic password generation but you can also map fields to Buddypress 🙂
In reply to: [Resolved] Logged-In User Profile Link URLHi, this thread was really helpful to me trying to add a link on my homepage to the logged in user’s profile page.
I ended up writing it up as a shortcode so thought I’d post here for future seekers.
function myprofile_shortcode() { global $current_user; get_currentuserinfo(); $myprofileurl = '<a href="'. home_url() . '/members/' . $current_user->user_login . '/profile/">My Profile</a>'; return $myprofileurl; } add_shortcode('myprofileurl', 'myprofile_shortcode');Happy days 🙂