Filter for account type for contacts

This commit is contained in:
Michael 2020-10-09 19:08:50 +00:00
parent ae6b380362
commit 4b9cbac23e
7 changed files with 78 additions and 53 deletions

View file

@ -192,23 +192,7 @@ class Community extends BaseModule
throw new HTTPException\ForbiddenException(DI::l10n()->t('Access denied.'));
}
switch ($parameters['accounttype'] ?? '') {
case 'person':
self::$accounttype = User::ACCOUNT_TYPE_PERSON;
break;
case 'organisation':
self::$accounttype = User::ACCOUNT_TYPE_ORGANISATION;
break;
case 'news':
self::$accounttype = User::ACCOUNT_TYPE_NEWS;
break;
case 'community':
self::$accounttype = User::ACCOUNT_TYPE_COMMUNITY;
break;
default:
self::$accounttype = null;
break;
}
self::$accounttype = User::getAccountTypeByString($parameters['accounttype'] ?? '');
self::$content = $parameters['content'] ?? '';
if (!self::$content) {