Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    Do you mean you want to prevent admin user login redirect to admin dashboard? We have done this intentionally but if you want to change it then you can use the filter ‘uwp_login_redirect’ to redirect it according to your requirements.

    Regards,
    Patrik

    Thread Starter Urmil Patel

    (@urmilwp)

    Hi,

    filter ‘uwp_login_redirect’ to redirect it according to not work,

    add_filter('uwp_login_redirect', 'uwp_login_redirect_cb', 10, 2);
    function uwp_login_redirect_cb($redirect_to, $redirect_page_id, $data, $user){
        //global $redirect_to,$uwp_notices;
        if (current_user_can('manage_options')) {
            $redirect_to = admin_url();
            return $redirect_to;
    
        }

    }`

    Hi,

    Not sure what you are trying to do. Do you want to redirect admin to the dashboard? That should be done by default.

    Regards,
    Patrik

    Hi,
    I have a similaire case,
    I set up my user’s login, password, it was redirected to the dashboard,
    ( usually the dashboard is only opened for the administrator),
    How can I prevent it ?
    because many of my users will enter in my dashboard.
    thanks a lot

    Hi,

    Can you please clarify the problem so that we can help you out and create a new ticket so other users are not notified frequently for our conversations?

    Regards,
    Patrik

    Hi,
    When I visit my site as an user ( not administrator),
    When I clicked on login to open my profile,
    sometime, it opened the dashboard, it is not normal,
    normally, it will open the site.
    So how can I do to prevent the users who open my dashboard ?
    thank you so much!

    Plugin Contributor Paolo

    (@paoltaia)

    Hi @ditout,

    UsersWP redirects users according to your settings in UsersWP > Redirects > LoginRedirect Page or Redirect Custom URL.

    Can you please check your settings and see if you spot anything wrong?

    If not, please try to disable all other plugins momentarily and test again. If the problem goes away, there is a conflict with another plugin.

    Let us know how it goes.

    Thanks,

    Plugin Contributor Paolo

    (@paoltaia)

    @ditout, for future reference, it would be better to avoid commenting in resolved posts from other users (even if they seem related) and open your own support topics.

    Thanks,

    Hi @ditout,

    If you try to login with the admin user login then it will open the dashboard only but if you login with a non-admin user then it will follow the setting set as Paolo said.

    Regards,
    Patrik

    Hi,
    OK, I think I can get it,
    thank you so much !
    regards.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Userswp administrator login after redirect dashbord’ is closed to new replies.