Gregwar / Captcha

PHP Captcha library
MIT License
1.73k stars 290 forks source link

comparing user input phrase with session phrase #31

Closed ghost closed 8 years ago

ghost commented 8 years ago

I want to compare user input phrase with session phrase. but ($_SESSION['phrase'] === $userInput) is that I can not use niceize.

Gregwar commented 8 years ago

This is a nice idea However the think is that this is not really instance-related, I mean there is actually no reason to instanciate a Captcha to call this test Maybe we should introduce a static method that do the niceized test like CaptchaBuilder::comparePhrases (niceize could also get static)

ghost commented 8 years ago

Thank you for replay. I understand :smiley: