$isAdmin = $this->groupManager->isAdmin($user->getUID());
$subAdminManager = $this->groupManager->getSubAdmin();
- if(empty($userid) && $this->config->getAppValue('settings', 'newUser.generateUserID', '0') === '1') {
+ if(empty($userid) && $this->config->getAppValue('core', 'newUser.generateUserID', 'no') === 'yes') {
$userid = $this->createNewUserId();
}
$generatePasswordResetToken = true;
}
- if ($email === '' && $this->config->getAppValue('settings', 'newUser.requireEmail', '0') === '1') {
+ if ($email === '' && $this->config->getAppValue('core', 'newUser.requireEmail', 'no') === 'yes') {
throw new OCSException('Required email address was not provided', 110);
}
->method('getAppValue')
->willReturnCallback(function($appid, $key, $default) {
if($key === 'newUser.generateUserID') {
- return true;
+ return 'yes';
}
return null;
});
->method('getAppValue')
->willReturnCallback(function($appid, $key, $default) {
if($key === 'newUser.generateUserID') {
- return '1';
+ return 'yes';
}
return null;
});
->method('getAppValue')
->willReturnCallback(function($appid, $key, $default) {
if($key === 'newUser.requireEmail') {
- return '1';
+ return 'yes';
}
return null;
});
// Settings
$serverData['defaultQuota'] = $defaultQuota;
$serverData['canChangePassword'] = $canChangePassword;
- $serverData['newUserGenerateUserID'] = $this->config->getAppValue('settings', 'newUser.generateUserID', '0') === '1';
- $serverData['newUserRequireEmail'] = $this->config->getAppValue('settings', 'newUser.requireEmail', '0') === '1';
+ $serverData['newUserGenerateUserID'] = $this->config->getAppValue('core', 'newUser.generateUserID', 'no') === 'yes';
+ $serverData['newUserRequireEmail'] = $this->config->getAppValue('core', 'newUser.requireEmail', 'no') === 'yes';
return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData]);
}