I have got the Register snippet up and working. People are getting registered to the intended usergroup nicely, but I notice that the snippet is allowing the same email to be used multiple times.
When I look at the Register snippet I see this:
/* ensure if allow_multiple_emails setting is false, prevent duplicate emails */
if (!$modx->getOption('allow_multiple_emails',null,false)) {
$emailTaken = $modx->getObject('modUserProfile',array('email' => $fields[$emailField]));
if ($emailTaken) {
$login->validator->errors[$emailField] = $modx->lexicon('register.email_taken',array('email' => $fields[$emailField]));
}
}
But in the Register (Login) documentation I can’t see anything that specifies how to make sure multiple emails are not allowed.
Any ideas?
Thanks.