WordPress.org

Forums

Password Protect Pages (6 posts)

  1. jtovet
    Member
    Posted 3 years ago #

    Hi I have setup one page in my clients wordpress website as password protected. It works great and does just exactly what I want it to do. My question however is how does a visitor log out? In other words, a visitor visits the site and wants to go to the password protected page. He enters in the appropriate password and is allowed into the page. He conducts his business and then leaves. I need him to be able to log out when he leaves. Right now, once he's in, it seems like the page is permanently unlocked for his computer. My client wants a "log off" button or link on the page so that the visitor can log in, do business, log out and if another person should use his computer (which apparently is likely) they can't access that page if they don't have the password.
    I hope that makes sense.
    thanks in advance!

    Jim

  2. Brad Markle
    Member
    Posted 3 years ago #

    Hi Jim, I've seen this question before and I don't think there is actually a way to log someone out. I've found a few links that you may find helpful:

    Creating a .htaccess Logout

    HTTP authentication logout via PHP

    How to logout when using .htaccess (and .htpasswd) authentication? [closed]

    If you take a stab at one of these suggestions, be sure to let us know how it goes or if you run into any issues!

  3. jtovet
    Member
    Posted 3 years ago #

    Thank you Brad, I'll let you know how I make out!
    Jim

  4. Brad Markle
    Member
    Posted 3 years ago #

    Hi Jim, I just wanted to touch base to see how everything is going with the password protection issue? Were you able to use the tutorial and come up with a "logout" type of button?

  5. jtovet
    Member
    Posted 3 years ago #

    Hi Brad,

    No, actually I had no luck. The good news for me was my client called to tell me that he's decided to open the page up to everyone and there would be no need for a password!

    I am going to continue to try to figure it out though because I'm sure it will come up again.

    Thanks again for your help, if I figure it out I'll be sure to let you know.

    Jim

  6. govpatel
    Member
    Posted 3 years ago #

    You can create a template that only logged in members can see that way they can log out of computer

Topic Closed

This topic has been closed to new replies.

About this Topic