Forums

[resolved] Case insensitive passwords ONLY on password protected pages? (2 posts)

  1. aramaz
    Member
    Posted 3 months ago #

    Is there a plugin or a hack to make the passwords on password protected pages case insensitive? I want the main admin login to stay as it is now, case sensitive, but for the password protected pages it should be that it doesn't matter whether a user enters ABCD or abcd ass password.

    Any ideas on how I can code this without compromising security?

  2. aramaz
    Member
    Posted 3 months ago #

    I managed to solve this by using the add_filter function in the theme functions file and making my own post_password_required function that transforms the entered password to uppercase and checks whether it matches the uppercase password I set for the page.

    Relevant Codex pages:
    add_filter()
    post_password_required()

Reply

You must log in to post.

About this Topic