- Affected version
- 2.1,2.2
Most forum owners require email confirmations because they don't want users registered with fake emails and a lot of forums require both email confirmation and admin approval .. currently xenforo handles this incorrectly
spam check on registration service can set user state to moderated, in this case
and user will be moved directly to approval queue without confirming email ..
spam check on registration service can set user state to moderated, in this case
setInitialUserState()
won't do more processing
Code:
protected function setInitialUserState()
{
$user = $this->user;
$options = $this->app->options();
if ($user->user_state != 'valid')
{
return; // We have likely already set the user state elsewhere, e.g. spam trigger
}
if ($options->registrationSetup['emailConfirmation'] && !$this->skipEmailConfirm)
{
$user->user_state = 'email_confirm';
}
else if ($options->registrationSetup['moderation'])
{
$user->user_state = 'moderated';
}
else
{
$user->user_state = 'valid';
}
}