Don't break with older versions

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-03-31 15:27:24 +02:00
parent d140ee8d77
commit 2b8dc3c4cc
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 11 additions and 9 deletions

View File

@ -386,6 +386,7 @@ class RegistrationService {
}
// Set phone number in account data
if (method_exists($this->accountManager, 'updateAccount')) {
$account = $this->accountManager->getAccount($user);
$property = $account->getProperty(IAccountManager::PROPERTY_PHONE);
$account->setProperty(
@ -395,6 +396,7 @@ class RegistrationService {
IAccountManager::NOT_VERIFIED
);
$this->accountManager->updateAccount($account);
}
// Add user to group
$registeredUserGroup = $this->config->getAppValue($this->appName, 'registered_user_group', 'none');