Support » Plugin: Clean Login » Additional validation

  • Resolved bennettscience

    (@bennettscience)


    This plugin is great – it made our login refactor much simpler than I was expecting.

    I’m wondering if there is a way we could work in some additional validation, specifically checking the user email address for a specific structure. I tried modifying clean-login.php with a little utility script which used regex, but I can’t get it to return true, even on a valid input. Any tips on doing this? Or even a tip on how to debug more effectively?

Viewing 4 replies - 1 through 4 (of 4 total)
  • bennettscience

    (@bennettscience)

    We worked out a solution that did not require modifying the plugin.

    Plugin Author Alberto Hornero

    (@hornero)

    Ouch! @bennettscience, I did not realise about your previous question. Sorry about that.

    Would you mind sharing your solution in the case were useful for others?

    Regards,

    Alberto.

    bennettscience

    (@bennettscience)

    It’s okay.

    I copied the base plugin and added some regex checks in the logic. Because I was in a time crunch, I didn’t modify the settings page and hardcoded for our purposes.

    Do you have a git repo? I’d be happy to get a general setting in there quick to allow people to set a domain for whitelisting and submit a pull request.

    Plugin Author Alberto Hornero

    (@hornero)

    Hi @bennettscience

    Sure! you can submit the changes here: https://github.com/ahornero/clean-login

    Alberto.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Additional validation’ is closed to new replies.