Last active
April 5, 2021 08:48
-
-
Save cgi-caesar/3fc176f80afc8872cf4f7d1e17eba188 to your computer and use it in GitHub Desktop.
aMember (site.php): disallow signups with same first and last name (usually spam signups)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Am_Di::getInstance()->hook->add(Am_Event::VALIDATE_SAVED_FORM, function (Am_Event_ValidateSavedForm $event) { | |
| $form = $event->getForm(); | |
| $vars = $form->getValue(); | |
| if (isset($vars['name_f']) && isset($vars['name_l']) && $vars['name_f'] == $vars['name_l']) | |
| { | |
| $event->addError('Some Error Occurred! Please try to signup later...'); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment