• Resolved june01

    (@june01)


    Hi, in member directory front end, when I approve a user, I will be redirected to my own profile. I don’t want this to happen and just stay in the same page. How can I disable it? I want to stay in same page, so I can easily approve and reject many users.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @june01

    Please try adding the following code snippets to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code:

    add_filter("um_member_directory_users_card_actions","um_083021_member_list_actions", 99, 2);
    function um_083021_member_list_actions( $actions, $user_id ){
        if ( ! empty( $actions ) ) {
            foreach ( $actions as $id => $arr ) {
                $members_url = um_get_core_page("members");
                $url = add_query_arg( array( 'um_action' => $id, 'uid' => $user_id ), $members_url );
    
                $actions[ $id ] = array(
                    'title' => $arr['title'],
                    'url'   => $url,
                );
            }
        }
    
        return $actions;
    }

    The above code will redirect the admin back to the member page when approving a user profile via the member directory.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent Redirect when approve/reject new member’ is closed to new replies.