This commit is contained in:
@@ -314,12 +314,6 @@ final class AccountPages
|
||||
}
|
||||
$communityAccess->submitApplication($userId, (string)($_POST['motivation'] ?? ''));
|
||||
$info = 'Deine Bewerbung wurde eingereicht.';
|
||||
} elseif ($action === 'community_migrate') {
|
||||
if (!$communityAccess || !$communityMigration || !$communityAccess->canManageApplications($userId)) {
|
||||
throw new \RuntimeException('Keine Berechtigung für die Community-Migration.');
|
||||
}
|
||||
$communityMigration->apply();
|
||||
$info = 'Die Community-Migration wurde ausgeführt.';
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
$error = $e->getMessage();
|
||||
@@ -405,11 +399,6 @@ final class AccountPages
|
||||
'reply_blocked' => false,
|
||||
'reason' => null,
|
||||
];
|
||||
$communityIsSiteAdmin = $communityAccess ? $communityAccess->canManageApplications($userId) : false;
|
||||
$communityMigrationStatus = ($communityMigration && $communityIsSiteAdmin) ? $communityMigration->status() : null;
|
||||
if (in_array('forum_admin', $communityRoles, true) || $communityIsSiteAdmin) {
|
||||
$allowedSections[] = 'admin';
|
||||
}
|
||||
if (!in_array($section, $allowedSections, true)) {
|
||||
$section = 'profile';
|
||||
}
|
||||
@@ -429,8 +418,6 @@ final class AccountPages
|
||||
'communityApplication',
|
||||
'communityCanApply',
|
||||
'communityRestrictions',
|
||||
'communityIsSiteAdmin',
|
||||
'communityMigrationStatus',
|
||||
'section',
|
||||
'allowedSections'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user