Viewing 1 replies (of 1 total)
  • If you go to Ultimate Member -> User Roles, on each role you can set an “action to take after login” which defaults to going to your profile page. You can change that to point at BuddyPress’s profile page instead if you want. Set it for “redirect to URL” and put in https://dev.handicapreview.com/members/ . This assumes that BuddyPress will redirect to the current user if you don’t give it one (which UM does also). Which… it looks like it doesn’t. You get the member directory instead. If BBPress has any kind of standard URL for “my profile” you can use that. Otherwise you might need a custom plugin/theme to hook the after login action and set it yourself.

    The hook to use if you need it is this one: https://docs.ultimatemember.com/article/1188-umonloginbeforeredirect

    in your theme or plugin, do:

    function my_redirect_after_login( $userid ) {
        exit(wp_redirect(site_url() . "/members/" . get_user_meta($userid, "um_user_profile_url_slug_name", true)));
    }
    add_action( 'um_on_login_before_redirect', 'my_redirect_after_login', 10, 1 );

    Note that you’ll need to replace ‘um_user_profile_url_slug_name’ with whatever BuddyPress uses for the URL slug for the user. If BuddyPress has a function that returns the entire profile URL you can even use that in place of the entire argument for wp_redirect.

    • This reply was modified 4 years, 7 months ago by justdave. Reason: fix bugs in sample code
    • This reply was modified 4 years, 7 months ago by justdave.
Viewing 1 replies (of 1 total)
  • The topic ‘Need to disable profile page’ is closed to new replies.