Allow empty emails provisionning api

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-03-17 12:18:22 +01:00
parent 3cac7911d5
commit ccd57ce1b1
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ class UsersController extends OCSController {
$this->config->setUserValue($targetUser->getUID(), 'core', 'lang', $value);
break;
case AccountManager::PROPERTY_EMAIL:
if(filter_var($value, FILTER_VALIDATE_EMAIL)) {
if(filter_var($value, FILTER_VALIDATE_EMAIL) || $value === '') {
$targetUser->setEMailAddress($value);
} else {
throw new OCSException('', 102);