• Resolved mcnamara14

    (@mcnamara14)


    Hello,

    My client would like the password to not be case sensitive. For example the password she advertises is MOJO but many people type in mojo instead. Is there a way to make it not case sensitive or add two passwords to a download so someone can enter either password and it will work?

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, which password are you referring to?

    Thank you

    Thread Starter mcnamara14

    (@mcnamara14)

    I am referring to the password you can set under Publish->Visibility.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, that password is related to WordPress. This plugin does not control the functionality of that password.

    Regards

    Hi @mcnamara14,

    There’s no way how to do it without touching plugin files (ie. no filter etc.) Anyway, you can achieve this by editing line 33 in simple-download-monitor/includes/sdm-download-request-handler.php file.

    Change:

    $post_pass != $pass_val

    To:

    strtolower($post_pass) != strtolower($pass_val)

    This way the password check will be case insensitive.

    Cheers,
    ?eslav

    Thread Starter mcnamara14

    (@mcnamara14)

    Thanks for the reply although when I make that change I get the following error:

    Parse error: syntax error, unexpected ‘strtolower’ (T_STRING), expecting ‘(‘ in /home/asklizry/public_html/humanworkplace/wp-content/plugins/simple-download-monitor/includes/sdm-download-request-handler.php on line 33

    You have probably omitted one opening or closing parenthesis. The whole line should read:

    if (strtolower($post_pass) != strtolower($pass_val)) { 
    Thread Starter mcnamara14

    (@mcnamara14)

    Great that worked! Thank you!

    Plugin Contributor mbrsolution

    (@mbrsolution)

    @chesio, thank you. Is this a feature that will be added in plugin in the future release?

    @mbrsolution, I don’t know if such feature is considered generally useful – maybe someone from plugin authors (@mra13) could comment on this?

    • This reply was modified 7 years, 11 months ago by ?eslav Przywara. Reason: grammar
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Create a password that is not case sensitive’ is closed to new replies.