getBackendUser()->isSystemMaintainer(); $isTargetUserInSystemMaintainerList = in_array($id, $systemMaintainers, true); if (!$isCurrentUserSystemMaintainer && $isTargetUserInSystemMaintainerList) { $message = $this->getLanguageService()->sL( 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:formEngine.beUser.information.adminCanNotChangeSystemMaintainer' ); $flashMessage = new FlashMessage( $message, '', ContextualFeedbackSeverity::INFO ); $this->flashMessageService->getMessageQueueByIdentifier()->enqueue($flashMessage); foreach ($result['processedTca']['columns'] as &$fieldConfig) { $fieldConfig['config']['readOnly'] = true; } } return $result; } protected function getLanguageService(): LanguageService { return $GLOBALS['LANG']; } protected function getBackendUser(): BackendUserAuthentication { return $GLOBALS['BE_USER']; } }