• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed New user conversation doesn't allow only one participant?

Liam W

Well-known member
#1
I'm trying to setup the new user conversation feature, but I keep on getting the 'Please enter at least one valid recipient.' error when saving.

I've entered my username in the recipient box, as I want to be the sender and noone else needs to participate.

If I add another user, it works fine.

Liam
 

Chris D

XenForo developer
Staff member
#2
Fixed now, thanks.

Relatively straight forward self-fix.

library/XenForo/Option/RegistrationWelcome.php:

PHP:
if ($conversationDw->hasErrors())
{
    $errors = $conversationDw->getErrors();
    $dw->error(reset($errors), $fieldName);
    return false;
}
Change that to:
PHP:
if ($conversationDw->hasErrors())
{
    $errors = $conversationDw->getErrors();

    if (isset($errors['recipients']))
    {
        unset($errors['recipients']);
    }

    if (count($errors))
    {
        $dw->error(reset($errors), $fieldName);
        return false;
    }
}