• Resolved sarkarify

    (@sarkarify)


    Hi there,

    I want to disable admin login from front end so that admins can only be able to login by using wordpress default login page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @sarkarify

    Thank you for using Paid Memberships Pro.

    This would require a bit of custom coding to work, as it’s difficult to determine who is an admin while they are logged-out.

    You may advise your admins that they may login using the /wp-login.php URL of your site as this URL shouldn’t be redirected.

    Thread Starter sarkarify

    (@sarkarify)

    Thanks @andrewza for replying

    Admins are login using /wp-login.php url

    here my issue is i want to block paid membership pro login page for admins, means admins can only be able to use /wp-login.php for login they can not able to use pmpro login page.

    right now admins can able to login from both page /wp-login.php and pmpro login page i want to know is there any way to block admin login from front end so that admins can only use /wp-login.php

    If there is a manual coding please let me know

    Thanks

    Plugin Author Andrew Lima

    (@andrewza)

    This will require custom code to achieve. It may require a bit of work to achieve for when the user is logged-out as you’d have to check during authentication if the user is an admin or not and then deny them from logging in on the frontend and redirect them or show a message to login elsewhere.

    Here is the code where we try to authenticate the user, you may need to hook in here and figure out if the user is an admin or not – https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/login.php#L841-L880

    You could possibly also redirect admins away if they are logged-in and try to view the login page. However the form won’t show for logged-in users, but rather show a message.

    I highly recommend reaching out to a developer to assist you with this custom solution as it’s beyond our support scope. I hope this helps get you started.

    Thread Starter sarkarify

    (@sarkarify)

    Thanks @andrewza

    I will try first as you have recommended.

    Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can i disable admin login from front end’ is closed to new replies.