• Resolved AutomatedKid

    (@automatedkid)


    buddypress 1.9.1
    wordpress 3.8

    i fortunately haven’t opened up registrations yet (getting close!) but since the latest wp update, wp hide dashboard plugin stopped working, so users below network admin are being directed to their wp user account on login, not just being logged in like previously, which the plugin was doing.

    so i was doing some testing, couldn’t get it right, and was wondering if someone had the code or can direct me to it?

    this is what i’m looking for…

    login
    1. prevent users, contributors and below, to use wp-admin as a login;
    2. redirect users, contributors and below, when using wp-login, to the same page (or previous) on that specific blog;

    logout
    1. the user, contributor or below, gets redirected to the main blog home page (or, once i see the logic used, i can probably figure how to use another page)

    and if someone has suggestions on ‘why’ not to do it this way, i’m willing to listen.

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can’t prevent wp-admin from working, but you can redirect them. You can’t prevent it because the check for “This person is not an admin” happens AFTER they log in (before that, they’re no one). If you block it for everyone, you can break logins for yourself ??

    A simple redirector would be this: https://www.ads-software.com/plugins/wp-hide-dashboard/

    That hides the dashboard.

    Redirecting the user based on what page they’re on would require you to make a custom login form and use this: https://codex.www.ads-software.com/Function_Reference/wp_login_url#Login_and_Redirect_to_Current_Page

    Thread Starter AutomatedKid

    (@automatedkid)

    gotcha. that’s what i thought, wasn’t sure, now i know. i found some code to redirect non-admins, will test later.

    hmmm, this is really strange! now when testing login w/ wp-hide-dashboard (installed since day 1), it’s working and sending the contributor to the main blog home page when using the toolbar login and bypasses the wp dashboard, like it should. the same for login on each specific blog, user stays on site, not going to main blog, bypasses the dashboard.

    one word: odd

    and i guess i just missed it by a day so since it’s been about week since glancing at the hide dashboard plugin support forum, someone else had posted having an issue with wp 3.8 – not sure of the details, didn’t list them – so maybe i’m not alone on this topic and there’s a hiccup somewhere. so i’ll inquire over there.

    regardless, appreciate the response, mika, i think i’ll have it resolved one way or another.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hide wp-admin, redirect certain users, both login and logout’ is closed to new replies.