You need to log in to create posts and topics.

Edit profile front page function

12

Thank you su much @asgaros

 

Quote from hilo90mhz on February 13, 2018, 9:45 am

I also had this issue recently - the "Ultimate Member" plugin has a nice way to edit your local profile. The default location to edit your user profile (if not admin) is at http://www.myurl.com/user/

One issue was the default "My Profile" link from Asgaros forum works, but the "Edit Profile" button does not work with ultimate plugin as the backend is blocked by "ultimate member" plugin and we want it to go to the /user/ location.

Solution I am currently using is this in my child theme functions.php to override the profile edit location:

// below function redirects the forum users to the "Ultimate Member" Profile editing page
add_action ('init' , 'prevent_profile_access'); 

function prevent_profile_access() {
   		if (current_user_can('manage_options')) return '';
    
   		if (strpos ($_SERVER ['REQUEST_URI'] , 'wp-admin/profile.php' )){
      		wp_redirect ("https://yoururl.com/user/");
            die();
 		 }

}

 

Thank you for sharing it worked for me. I directed the edit profile to woocommerce my account shortcode it allows my uses to edit their account and change password. I used WP User Avatar Plugin. to auto-generate profile retro image. I hope this helps someone.

12