How to stop to access to admin area by student of CoursePress Pro!

Hey!
I hope you having a good day.
Today, I want your help.
I am currently building my Coursepress and Membership 2 based site.

Then, as a test user, I registered to my site now.
However, when the demo user tried to go to http:// ~~~~/admin , he could log in to dashboard.
I don't like this behavior, so I want my student to redirect to main page.

How should I do?

King Regards
KAZUKI KIKUCHI

  • Milan

    Hello @kazuki1220eri0721,

    I hope you are well today and thanks for asking us. :slight_smile:

    Then, as a test user, I registered to my site now.

    Through which plugin you are trying to register your dummy user ? Membership 2 Pro or CoursePress Pro ? And where you want to redirect your user to ? Are you referring your homepage as your main page ? Please advice bit more on this. :slight_smile:

    Looking forward to hearing back from you. :slight_smile:

    Cheers,
    Milan

  • KAZUKI KIKUCHI

    Hi Milan.
    Thanks for your support.

    My dummy user currently use the registration system of CoursePress Pro.
    Actually, I don't know how to use the registration system of Membership pro2.
    And also, which membership system is correct for my use?

    My use is like that.
    https://premium.wpmudev.org/forums/topic/let-me-check-the-function-with-coursepress-pro-and-membership-2-pro#post-1042623

    In terms of main page, I mean it is dashboard in this case.

    Thanks for your support.

    KAZUKI

  • Adam Czajczyk

    Hello Kazuki,

    I hope you have a nice day!

    Actually, I don't know how to use the registration system of Membership pro2.

    I can see that Membership 2 Pro plugin is already active on your site. This means that the plugin takes over all default registration procedures so your new users are actually registering via Membership 2 Pro already. The "create user account" and "enroll for a course" procedures are two separate things so I think this is already handled fine. Now, as for redirect.

    There are two ways to proceed here. First one is built-in CoursePress "Redirect after login" feature. Please go to your dashboard's "CoursePress Pro -> Settings -> General" page and find the "WP Login Redirection" section. If the "Redirect after login" check-box is checked, students should be automatically redirected to their "Student Dashboard" when they log in. If it's not checked, the default WP workflow will work, meaning that students will be redirected to their WP dashboards.

    The second way would be to use the Membership 2 Pro redirect feature. To use it, please go to your dashboard's "Membership 2 -> Add-ons" page an activate the "Redirect Control" add-on. Once this is done, go to "Membership 2 -> Settings -> Redirect" page and set "After Login" redirect by providing a "target" URL to which users should be taken after they log in.

    The difference here is that CoursePress login will affect students only (and not other users) and will by default redirect them to their "Student Dashboard". The Membership 2 redirect however should affect all registered users of your site and would also let you set any page of your choice for redirect.

    I hope that helps!
    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.