This commit is contained in:
@@ -938,9 +938,23 @@ final class AccountPages
|
||||
$communityLevelRightDefinitions = Community::membershipRightDefinitions();
|
||||
$communityRoles = $communityAccess ? $communityAccess->getUserRoles($userId) : [];
|
||||
$systemRoleAssignments = $communityAccess && $canManageProfileLevels ? $communityAccess->listRoleAssignments() : [];
|
||||
$recentHighLevelUsers = [];
|
||||
$recentHighLevelThresholdLabel = '';
|
||||
$profileLevelUserSearchQuery = '';
|
||||
$profileLevelUserSearchResults = [];
|
||||
if ($communityAccess && $community && $canManageProfileLevels) {
|
||||
$highLevelThreshold = null;
|
||||
foreach ($communityLevelDefinitions as $levelDefinition) {
|
||||
if ((string)($levelDefinition['label'] ?? '') === 'Säule der Väter-Community') {
|
||||
$highLevelThreshold = (float)($levelDefinition['min'] ?? 0.0);
|
||||
$recentHighLevelThresholdLabel = (string)($levelDefinition['label'] ?? '');
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($highLevelThreshold !== null && $highLevelThreshold > 0) {
|
||||
$recentHighLevelUsers = $community->listRecentlyReachedLevelUsers($highLevelThreshold, 30, 12);
|
||||
}
|
||||
|
||||
$profileLevelUserSearchQuery = trim((string)($_GET['profile_level_user_query'] ?? ''));
|
||||
if ($profileLevelUserSearchQuery !== '') {
|
||||
foreach ($communityAccess->searchUsers($profileLevelUserSearchQuery, 12) as $searchRow) {
|
||||
@@ -1031,6 +1045,8 @@ final class AccountPages
|
||||
'communityLevelRightDefinitions',
|
||||
'communityRoles',
|
||||
'systemRoleAssignments',
|
||||
'recentHighLevelUsers',
|
||||
'recentHighLevelThresholdLabel',
|
||||
'profileLevelUserSearchQuery',
|
||||
'profileLevelUserSearchResults',
|
||||
'communityApplication',
|
||||
|
||||
Reference in New Issue
Block a user