Allow empty emails provisionning api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
3cac7911d5
commit
ccd57ce1b1
|
@ -451,7 +451,7 @@ class UsersController extends OCSController {
|
||||||
$this->config->setUserValue($targetUser->getUID(), 'core', 'lang', $value);
|
$this->config->setUserValue($targetUser->getUID(), 'core', 'lang', $value);
|
||||||
break;
|
break;
|
||||||
case AccountManager::PROPERTY_EMAIL:
|
case AccountManager::PROPERTY_EMAIL:
|
||||||
if(filter_var($value, FILTER_VALIDATE_EMAIL)) {
|
if(filter_var($value, FILTER_VALIDATE_EMAIL) || $value === '') {
|
||||||
$targetUser->setEMailAddress($value);
|
$targetUser->setEMailAddress($value);
|
||||||
} else {
|
} else {
|
||||||
throw new OCSException('', 102);
|
throw new OCSException('', 102);
|
||||||
|
|
Loading…
Reference in New Issue