• Resolved arr0w

    (@arr0w)


    Hi

    I’m using the login plugin and the 24 hour cookie to let people access their records.
    How do I create an logout button to let another user sign in?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The only reason you’d need this is if someone on the same computer wanted to access a different record…is that what you need?

    Thread Starter arr0w

    (@arr0w)

    Exactly!

    I’m guessing we just need to delete the pdb-cookie – But how do you do that with a click of a button?

    Plugin Author xnau webdesign

    (@xnau)

    OK, it was easy to add, so in version 1.9.5 of the Participants Login plugin, you can add ?pdb-logout to the URL for your login form and it will clear the cookie and let you log in again.

    for example if your login form is on a page named ‘pdb-login’:

    https://xnau.com/pdb-login?pdb-logout

    Thread Starter arr0w

    (@arr0w)

    Thank you!

    Just one thing to point out: When I log out and tries to log in on the same page, I’m redirected as i should, but the record page still displays the “no records was found” error text and the cookie isn’t created again.

    Plugin Author xnau webdesign

    (@xnau)

    Looks like I made an error…I’ve issued an update to fix it. Thanks for letting me know.

    Thread Starter arr0w

    (@arr0w)

    After the update a previous error occurred:

    When I login with domain.com/login I’m redirected to domain.com/record (as expected)

    If I go back to the domain.com/login – I should be redirected back to the record – I’m not!
    Instead I’m redirected to domain.com/?page_id=454 – But I have no page with id=454

    No matter what I change in the “record page” setting, I’m still redirected to id=454 ?

    The only workaround is to disable the “Use Cookie” setting or delete det cookie/log out.

    Plugin Author xnau webdesign

    (@xnau)

    After deleting the cookies, does it work?

    Try refreshing your permalinks.

    Also, make sure your “Participant Record Page” setting is correct.

    Plugin Author xnau webdesign

    (@xnau)

    I had a closer look at this, should be working for you…what is the shortcode you’re using for the login form?

    Thread Starter arr0w

    (@arr0w)

    When I delete the cookie or disable the cookie setting it works, but when I enable it again, the same error appears.

    I tried refreshing my permalinks.

    The “Participant Record Page” setting is correct.

    I’m using [pdb_login] for my login form.

    Thread Starter arr0w

    (@arr0w)

    See reply above

    Plugin Author xnau webdesign

    (@xnau)

    Is the “Participant Record Page” (Record Form tab in the Participants Database settings) setting correct?

    Thread Starter arr0w

    (@arr0w)

    Yes, I already answered that question above

    • This reply was modified 7 years, 11 months ago by arr0w.
    Plugin Author xnau webdesign

    (@xnau)

    Sorry, missed that.

    If that setting is correct, and the user isn’t going to the correct page after completing the login form, there may be an issue with your permalinks. The fact that you are getting the query string format suggests this might be the case. Try flushing the permalinks.

    Another thing to check is in the login form, take a look at the HTML, there will be a hidden field named ‘pdbx-ser’ that holds the name of the page with the [pdb_record] shortcode where the user is supposed to be redirected to.

    Thread Starter arr0w

    (@arr0w)

    I tried flushing with no success.
    When I take a look in the HTML, everything looks fine. This is only possible when the user is not logged in, because when I am logged in, I’m redirected to the wrong record page.
    Please referer to this ticket, with the exact same problem – and here you managed to fix it (see the bottom): https://www.ads-software.com/support/topic/hide-private-id-in-url-on-load/#post-8445651

    As I said this problem has only something to do with the “Use Cookie”. Because, when this setting is turned off everything works fine (also the case in the link above). An important note is that this only applies when the user is ALREADY logged in and tries to access the domain.com/login page.

    Plugin Author xnau webdesign

    (@xnau)

    OK, looks like the cookie wasn’t getting read, so I fixed that.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Logout button for the login plugin’ is closed to new replies.