‪TYPO3CMS  9.5
SetupModuleController.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Psr\Http\Message\ResponseInterface;
18 use Psr\Http\Message\ServerRequestInterface;
42 
49 {
52 
56  const ‪PASSWORD_NOT_UPDATED = 0;
57 
61  const ‪PASSWORD_UPDATED = 1;
62 
66  const ‪PASSWORD_NOT_THE_SAME = 2;
67 
72  const ‪PASSWORD_OLD_WRONG = 3;
73 
80  'OLD_BE_USER' => 'Using $OLD_BE_USER of class SetupModuleController from the outside is discouraged, the variable will be removed.',
81  'MOD_MENU' => 'Using $MOD_MENU of class SetupModuleController from the outside is discouraged, the variable will be removed.',
82  'MOD_SETTINGS' => 'Using $MOD_SETTINGS of class SetupModuleController from the outside is discouraged, the variable will be removed.',
83  'content' => 'Using $content of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
84  'overrideConf' => 'Using $overrideConf of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
85  'languageUpdate' => 'Using $languageUpdate of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
86  ];
87 
91  private ‪$deprecatedPublicMethods = [
92  'storeIncomingData' => 'Using SetupModuleController::storeIncomingData() is deprecated and will not be possible anymore in TYPO3 v10.0.',
93  'main' => 'Using SetupModuleController::main() is deprecated and will not be possible anymore in TYPO3 v10.0.',
94  'init' => 'Using SetupModuleController::init() is deprecated and will not be possible anymore in TYPO3 v10.0.',
95  ];
96 
100  protected ‪$MOD_MENU = [];
101 
105  protected ‪$MOD_SETTINGS = [];
106 
110  protected ‪$content;
111 
115  protected ‪$overrideConf;
116 
120  protected ‪$OLD_BE_USER;
121 
125  protected ‪$languageUpdate;
126 
130  protected ‪$pagetreeNeedsRefresh = false;
131 
135  protected ‪$isAdmin;
136 
140  protected ‪$tsFieldConf;
141 
145  protected ‪$saveData = false;
146 
151 
155  protected ‪$passwordIsSubmitted = false;
156 
160  protected ‪$setupIsUpdated = false;
161 
165  protected ‪$settingsAreResetToDefault = false;
166 
172  protected ‪$formProtection;
173 
177  protected ‪$simulateSelector = '';
178 
182  protected ‪$simUser;
183 
189  protected ‪$moduleName = 'user_setup';
190 
196  protected ‪$moduleTemplate;
197 
201  public function ‪__construct()
202  {
203  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
204  $this->formProtection = ‪FormProtectionFactory::get();
205  $pageRenderer = $this->moduleTemplate->getPageRenderer();
206  $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
207  $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/FormEngine');
208  $pageRenderer->addInlineSetting('FormEngine', 'formName', 'editform');
209  $pageRenderer->addInlineLanguageLabelArray([
210  'FormEngine.remainingCharacters' => $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.remainingCharacters'),
211  ]);
212  }
213 
220  public function ‪getFormProtection()
221  {
222  trigger_error('SetupModuleController->getFormProtection() will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
224  }
225 
231  protected function ‪storeIncomingData()
232  {
233  // First check if something is submitted in the data-array from POST vars
234  $d = GeneralUtility::_POST('data');
235  $columns = ‪$GLOBALS['TYPO3_USER_SETTINGS']['columns'];
236  $backendUser = $this->‪getBackendUser();
237  $beUserId = $backendUser->user['uid'];
238  $storeRec = [];
239  $fieldList = $this->‪getFieldsFromShowItem();
240  if (is_array($d) && $this->formProtection->validateToken((string)GeneralUtility::_POST('formToken'), 'BE user setup', 'edit')) {
241  // UC hashed before applying changes
242  $save_before = md5(serialize($backendUser->uc));
243  // PUT SETTINGS into the ->uc array:
244  // Reload left frame when switching BE language
245  if (isset($d['lang']) && $d['lang'] != $backendUser->uc['lang']) {
246  $this->languageUpdate = true;
247  }
248  // Reload pagetree if the title length is changed
249  if (isset($d['titleLen']) && $d['titleLen'] !== $backendUser->uc['titleLen']) {
250  $this->pagetreeNeedsRefresh = true;
251  }
252  if ($d['setValuesToDefault']) {
253  // If every value should be default
254  $backendUser->resetUC();
255  $this->settingsAreResetToDefault = true;
256  } elseif ($d['save']) {
257  // Save all submitted values if they are no array (arrays are with table=be_users) and exists in $GLOBALS['TYPO3_USER_SETTINGS'][columns]
258  foreach ($columns as $field => $config) {
259  if (!in_array($field, $fieldList)) {
260  continue;
261  }
262  if ($config['table']) {
263  if ($config['table'] === 'be_users' && !in_array($field, ['password', 'password2', 'passwordCurrent', 'email', 'realName', 'admin', 'avatar'])) {
264  if (!isset($config['access']) || $this->‪checkAccess($config) && $backendUser->user[$field] !== $d['be_users'][$field]) {
265  if ($config['type'] === 'check') {
266  $fieldValue = isset($d['be_users'][$field]) ? 1 : 0;
267  } else {
268  $fieldValue = $d['be_users'][$field];
269  }
270  $storeRec['be_users'][$beUserId][$field] = $fieldValue;
271  $backendUser->user[$field] = $fieldValue;
272  }
273  }
274  }
275  if ($config['type'] === 'check') {
276  $backendUser->uc[$field] = isset($d[$field]) ? 1 : 0;
277  } else {
278  $backendUser->uc[$field] = htmlspecialchars($d[$field]);
279  }
280  }
281  // Personal data for the users be_user-record (email, name, password...)
282  // If email and name is changed, set it in the users record:
283  $be_user_data = $d['be_users'];
284  // Possibility to modify the transmitted values. Useful to do transformations, like RSA password decryption
285  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['modifyUserDataBeforeSave'] ?? [] as $function) {
286  $params = ['be_user_data' => &$be_user_data];
287  GeneralUtility::callUserFunction($function, $params, $this);
288  }
289  $this->passwordIsSubmitted = (string)$be_user_data['password'] !== '';
290  $passwordIsConfirmed = $this->passwordIsSubmitted && $be_user_data['password'] === $be_user_data['password2'];
291  // Update the real name:
292  if ($be_user_data['realName'] !== $backendUser->user['realName']) {
293  $backendUser->user['realName'] = ($storeRec['be_users'][$beUserId]['realName'] = substr($be_user_data['realName'], 0, 80));
294  }
295  // Update the email address:
296  if ($be_user_data['email'] !== $backendUser->user['email']) {
297  $backendUser->user['email'] = ($storeRec['be_users'][$beUserId]['email'] = substr($be_user_data['email'], 0, 80));
298  }
299  // Update the password:
300  if ($passwordIsConfirmed) {
301  if ($this->isAdmin) {
302  $passwordOk = true;
303  } else {
304  $currentPasswordHashed = ‪$GLOBALS['BE_USER']->user['password'];
305  $passwordOk = false;
306  $saltFactory = GeneralUtility::makeInstance(PasswordHashFactory::class);
307  try {
308  $hashInstance = $saltFactory->get($currentPasswordHashed, 'BE');
309  $passwordOk = $hashInstance->checkPassword($be_user_data['passwordCurrent'], $currentPasswordHashed);
310  } catch (InvalidPasswordHashException $e) {
311  // Could not find hash class responsible for existing password. This is a
312  // misconfiguration and user can not change its password.
313  }
314  }
315  if ($passwordOk) {
316  $this->passwordIsUpdated = ‪self::PASSWORD_UPDATED;
317  $storeRec['be_users'][$beUserId]['password'] = $be_user_data['password'];
318  } else {
319  $this->passwordIsUpdated = ‪self::PASSWORD_OLD_WRONG;
320  }
321  } else {
322  $this->passwordIsUpdated = ‪self::PASSWORD_NOT_THE_SAME;
323  }
324 
325  $this->‪setAvatarFileUid($beUserId, $be_user_data['avatar'], $storeRec);
326 
327  $this->saveData = true;
328  }
329  // Inserts the overriding values.
330  $backendUser->overrideUC();
331  $save_after = md5(serialize($backendUser->uc));
332  // If something in the uc-array of the user has changed, we save the array...
333  if ($save_before != $save_after) {
334  $backendUser->writeUC($backendUser->uc);
335  $backendUser->writelog(254, 1, 0, 1, 'Personal settings changed', []);
336  $this->setupIsUpdated = true;
337  }
338  // Persist data if something has changed:
339  if (!empty($storeRec) && $this->saveData) {
340  // Make instance of TCE for storing the changes.
341  $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
342  $dataHandler->start($storeRec, []);
343  $dataHandler->admin = true;
344  // This is to make sure that the users record can be updated even if in another workspace. This is tolerated.
345  $dataHandler->bypassWorkspaceRestrictions = true;
346  $dataHandler->process_datamap();
347  if ($this->passwordIsUpdated === self::PASSWORD_NOT_UPDATED || count($storeRec['be_users'][$beUserId]) > 1) {
348  $this->setupIsUpdated = true;
349  }
350  ‪BackendUtility::setUpdateSignal('updateTopbar');
351  }
352  }
353  }
354 
358  protected function ‪init()
359  {
360  $this->‪getLanguageService()->includeLLFile('EXT:setup/Resources/Private/Language/locallang.xlf');
361  $backendUser = $this->‪getBackendUser();
362  $this->isAdmin = $backendUser->isAdmin();
363  // Getting the 'override' values as set might be set in User TSconfig
364  $this->overrideConf = $backendUser->getTSConfig()['setup.']['override.'] ?? null;
365  // Getting the disabled fields might be set in User TSconfig (eg setup.fields.password.disabled=1)
366  $this->tsFieldConf = $backendUser->getTSConfig()['setup.']['fields.'] ?? null;
367  // id password is disabled, disable repeat of password too (password2)
368  if (isset($this->tsFieldConf['password.']) && $this->tsFieldConf['password.']['disabled']) {
369  $this->tsFieldConf['password2.']['disabled'] = 1;
370  $this->tsFieldConf['passwordCurrent.']['disabled'] = 1;
371  }
372  }
373 
379  protected function ‪getJavaScript()
380  {
381  $javaScript = '';
382  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook'] ?? [] as $function) {
383  $params = [];
384  $javaScript .= GeneralUtility::callUserFunction($function, $params, $this);
385  }
386  return $javaScript;
387  }
388 
392  protected function ‪main()
393  {
394  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
395  $this->content .= '<form action="' . (string)$uriBuilder->buildUriFromRoute('user_setup') . '" method="post" id="SetupModuleController" name="usersetup" enctype="multipart/form-data">';
396  if ($this->languageUpdate) {
397  $this->moduleTemplate->addJavaScriptCode('languageUpdate', '
398  if (top && top.TYPO3.ModuleMenu.App) {
399  top.TYPO3.ModuleMenu.App.refreshMenu();
400  }
401  if (top && top.TYPO3.Backend.Topbar) {
402  top.TYPO3.Backend.Topbar.refresh();
403  }
404  ');
405  }
406  if ($this->pagetreeNeedsRefresh) {
407  ‪BackendUtility::setUpdateSignal('updatePageTree');
408  }
409  // Start page:
410  $this->moduleTemplate->getPageRenderer()->addJsFile('EXT:backend/Resources/Public/JavaScript/md5.js');
411  // Use a wrapper div
412  $this->content .= '<div id="user-setup-wrapper">';
413  $this->content .= $this->moduleTemplate->header($this->‪getLanguageService()->getLL('UserSettings'));
414  $this->‪addFlashMessages();
415 
416  // Render the menu items
417  $menuItems = $this->‪renderUserSetup();
418  $this->content .= $this->moduleTemplate->getDynamicTabMenu($menuItems, 'user-setup', 1, false, false);
419  $formToken = $this->formProtection->generateToken('BE user setup', 'edit');
420  $this->content .= '<div>';
421  $this->content .= '<input type="hidden" name="simUser" value="' . (int)$this->simUser . '" />
422  <input type="hidden" name="formToken" value="' . htmlspecialchars($formToken) . '" />
423  <input type="hidden" value="1" name="data[save]" />
424  <input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />';
425  $this->content .= '</div>';
426  // End of wrapper div
427  $this->content .= '</div>';
428  // Setting up the buttons and markers for docheader
429  $this->‪getButtons();
430  // Build the <body> for the module
431  // Renders the module page
432  $this->moduleTemplate->setContent($this->content);
433  $this->content .= '</form>';
434  }
435 
443  public function ‪mainAction(ServerRequestInterface $request): ResponseInterface
444  {
445  $this->‪init();
446  $this->‪storeIncomingData();
447  $this->‪main();
448  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
449  }
450 
454  protected function ‪getButtons()
455  {
456  $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
457  $cshButton = $buttonBar->makeHelpButton()
458  ->setModuleName('_MOD_user_setup')
459  ->setFieldName('');
460  $buttonBar->addButton($cshButton);
461 
462  $saveButton = $buttonBar->makeInputButton()
463  ->setName('data[save]')
464  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveDoc'))
465  ->setValue('1')
466  ->setForm('SetupModuleController')
467  ->setShowLabelText(true)
468  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', ‪Icon::SIZE_SMALL));
469 
470  $buttonBar->addButton($saveButton);
471  $shortcutButton = $buttonBar->makeShortcutButton()
472  ->setModuleName($this->moduleName);
473  $buttonBar->addButton($shortcutButton);
474  }
475 
476  /******************************
477  *
478  * Render module
479  *
480  ******************************/
481 
488  protected function ‪renderUserSetup()
489  {
490  $backendUser = $this->‪getBackendUser();
491  $html = '';
492  $result = [];
493  $firstTabLabel = '';
494  $code = [];
495  $fieldArray = $this->‪getFieldsFromShowItem();
496  $tabLabel = '';
497  foreach ($fieldArray as $fieldName) {
498  $config = ‪$GLOBALS['TYPO3_USER_SETTINGS']['columns'][$fieldName];
499  if (isset($config['access']) && !$this->‪checkAccess($config)) {
500  continue;
501  }
502 
503  if (strpos($fieldName, '--div--;') === 0) {
504  if ($firstTabLabel === '') {
505  // First tab
506  $tabLabel = $this->‪getLabel(substr($fieldName, 8), '', false);
507  $firstTabLabel = $tabLabel;
508  } else {
509  $result[] = [
510  'label' => $tabLabel,
511  'content' => count($code) ? implode(LF, $code) : ''
512  ];
513  $tabLabel = $this->‪getLabel(substr($fieldName, 8), '', false);
514  $code = [];
515  }
516  continue;
517  }
518  $label = $this->‪getLabel($config['label'], $fieldName);
519  $label = $this->‪getCSH($config['csh'] ?: $fieldName, $label);
520  $type = $config['type'];
521  $class = $config['class'];
522  if ($type !== 'check') {
523  $class .= ' form-control';
524  }
525  $more = '';
526  if ($class) {
527  $more .= ' class="' . htmlspecialchars($class) . '"';
528  }
529  $style = $config['style'];
530  if ($style) {
531  $more .= ' style="' . htmlspecialchars($style) . '"';
532  }
533  if (isset($this->overrideConf[$fieldName])) {
534  $more .= ' disabled="disabled"';
535  }
536  $value = $config['table'] === 'be_users' ? $backendUser->user[$fieldName] : $backendUser->uc[$fieldName];
537  if (!$value && isset($config['default'])) {
538  $value = $config['default'];
539  }
540  $dataAdd = '';
541  if ($config['table'] === 'be_users') {
542  $dataAdd = '[be_users]';
543  }
544 
545  switch ($type) {
546  case 'text':
547  case 'number':
548  case 'email':
549  case 'password':
550  $noAutocomplete = '';
551 
552  $maxLength = $config['max'] ?? 0;
553  if ((int)$maxLength > 0) {
554  $more .= ' maxlength="' . (int)$maxLength . '"';
555  }
556 
557  if ($type === 'password') {
558  $value = '';
559  $noAutocomplete = 'autocomplete="new-password" ';
560  $more .= ' data-rsa-encryption=""';
561  }
562  $html = '<input id="field_' . htmlspecialchars($fieldName) . '"
563  type="' . htmlspecialchars($type) . '"
564  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']" ' .
565  $noAutocomplete .
566  'value="' . htmlspecialchars($value) . '" ' .
567  $more .
568  ' />';
569  break;
570  case 'check':
571  $html = $label . '<div class="checkbox"><label><input id="field_' . htmlspecialchars($fieldName) . '"
572  type="checkbox"
573  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' .
574  ($value ? ' checked="checked"' : '') .
575  $more .
576  ' /></label></div>';
577  $label = '';
578  break;
579  case 'select':
580  if ($config['itemsProcFunc']) {
581  $html = GeneralUtility::callUserFunction($config['itemsProcFunc'], $config, $this);
582  } else {
583  $html = '<select id="field_' . htmlspecialchars($fieldName) . '"
584  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' .
585  $more . '>' . LF;
586  foreach ($config['items'] as $key => $optionLabel) {
587  $html .= '<option value="' . htmlspecialchars($key) . '"' . ($value == $key ? ' selected="selected"' : '') . '>' . $this->‪getLabel($optionLabel, '', false) . '</option>' . LF;
588  }
589  $html .= '</select>';
590  }
591  break;
592  case 'user':
593  $html = GeneralUtility::callUserFunction($config['userFunc'], $config, $this);
594  break;
595  case 'button':
596  if ($config['onClick']) {
597  $onClick = $config['onClick'];
598  if ($config['onClickLabels']) {
599  foreach ($config['onClickLabels'] as $key => $labelclick) {
600  $config['onClickLabels'][$key] = $this->‪getLabel($labelclick, '', false);
601  }
602  $onClick = vsprintf($onClick, $config['onClickLabels']);
603  }
604  $html = '<br><input class="btn btn-default" type="button"
605  value="' . $this->‪getLabel($config['buttonlabel'], '', false) . '"
606  onclick="' . $onClick . '" />';
607  }
608  if (!empty($config['confirm'])) {
609  $confirmData = $config['confirmData'];
610  $html = '<br><input class="btn btn-default t3js-modal-trigger" type="button"'
611  . ' value="' . $this->‪getLabel($config['buttonlabel'], '', false) . '"'
612  . ' data-href="javascript:' . htmlspecialchars($confirmData['jsCodeAfterOk']) . '"'
613  . ' data-severity="warning"'
614  . ' data-title="' . $this->‪getLabel($config['label'], '', false) . '"'
615  . ' data-content="' . $this->‪getLabel($confirmData['message'], '', false) . '" />';
616  }
617  break;
618  case 'avatar':
619  // Get current avatar image
620  $html = '<br>';
621  $avatarFileUid = $this->‪getAvatarFileUid($backendUser->user['uid']);
622 
623  if ($avatarFileUid) {
624  $defaultAvatarProvider = GeneralUtility::makeInstance(DefaultAvatarProvider::class);
625  $avatarImage = $defaultAvatarProvider->getImage($backendUser->user, 32);
626  if ($avatarImage) {
627  $icon = '<span class="avatar"><span class="avatar-image">' .
628  '<img src="' . htmlspecialchars($avatarImage->getUrl(true)) . '"' .
629  ' width="' . (int)$avatarImage->getWidth() . '" ' .
630  'height="' . (int)$avatarImage->getHeight() . '" />' .
631  '</span></span>';
632  $html .= '<span class="pull-left" style="padding-right: 10px" id="image_' . htmlspecialchars($fieldName) . '">' . $icon . ' </span>';
633  }
634  }
635  $html .= '<input id="field_' . htmlspecialchars($fieldName) . '" type="hidden" ' .
636  'name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' . $more .
637  ' value="' . (int)$avatarFileUid . '" />';
638 
639  $html .= '<div class="btn-group">';
640  $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
641  if ($avatarFileUid) {
642  $html .=
643  '<button type="button" id="clear_button_' . htmlspecialchars($fieldName) . '" aria-label="' . htmlspecialchars($this->‪getLanguageService()->getLL('avatar.clear')) . '" '
644  . 'onclick="clearExistingImage(); return false;" class="btn btn-default">'
645  . $iconFactory->getIcon('actions-delete', ‪Icon::SIZE_SMALL)
646  . '</button>';
647  }
648  $html .=
649  '<button type="button" id="add_button_' . htmlspecialchars($fieldName) . '" class="btn btn-default btn-add-avatar"'
650  . ' aria-label="' . htmlspecialchars($this->‪getLanguageService()->getLL('avatar.openFileBrowser')) . '"'
651  . ' onclick="openFileBrowser();return false;">'
652  . $iconFactory->getIcon('actions-insert-record', ‪Icon::SIZE_SMALL)
653  . '</button></div>';
654 
655  $this->‪addAvatarButtonJs($fieldName);
656  break;
657  default:
658  $html = '';
659  }
660 
661  $code[] = '<div class="form-section"><div class="row"><div class="form-group t3js-formengine-field-item col-md-12">' .
662  $label .
663  $html .
664  '</div></div></div>';
665  }
666 
667  $result[] = [
668  'label' => $tabLabel,
669  'content' => count($code) ? implode(LF, $code) : ''
670  ];
671  return $result;
672  }
673 
680  public function ‪renderLanguageSelect()
681  {
682  $backendUser = $this->‪getBackendUser();
683  $language = $this->‪getLanguageService();
684  $languageOptions = [];
685  // Compile the languages dropdown
686  $langDefault = htmlspecialchars($language->getLL('lang_default'));
687  $languageOptions[$langDefault] = '<option value=""' . ($backendUser->uc['lang'] === '' ? ' selected="selected"' : '') . '>' . $langDefault . '</option>';
688  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'])) {
689  // Traverse the number of languages
690  ‪$locales = GeneralUtility::makeInstance(Locales::class);
691  $languages = ‪$locales->getLanguages();
692 
693  foreach ($languages as $locale => $name) {
694  if ($locale !== 'default') {
695  $defaultName = isset(‪$GLOBALS['LOCAL_LANG']['default']['lang_' . $locale]) ? ‪$GLOBALS['LOCAL_LANG']['default']['lang_' . $locale][0]['source'] : $name;
696  $localizedName = htmlspecialchars($language->getLL('lang_' . $locale));
697  if ($localizedName === '') {
698  $localizedName = htmlspecialchars($name);
699  }
700  $localLabel = ' - [' . htmlspecialchars($defaultName) . ']';
701  $available = in_array($locale, ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'], true) || is_dir(‪Environment::getLabelsPath() . '/' . $locale);
702  if ($available) {
703  $languageOptions[$defaultName] = '<option value="' . $locale . '"' . ($backendUser->uc['lang'] === $locale ? ' selected="selected"' : '') . '>' . $localizedName . $localLabel . '</option>';
704  }
705  }
706  }
707  }
708  ksort($languageOptions);
709  $languageCode = '
710  <select id="field_lang" name="data[lang]" class="form-control">' . implode('', $languageOptions) . '
711  </select>';
712  if ($backendUser->uc['lang'] && !@is_dir(‪Environment::getLabelsPath() . '/' . $backendUser->uc['lang'])) {
713  // TODO: The text constants have to be moved into language files
714  $languageUnavailableWarning = 'The selected language "' . htmlspecialchars($language->getLL('lang_' . $backendUser->uc['lang'])) . '" is not available before the language files are installed.&nbsp;&nbsp;<br />&nbsp;&nbsp;' . ($backendUser->isAdmin() ? 'You can use the Language module to easily download new language files.' : 'Please ask your system administrator to do this.');
715  $languageCode = '<br /><span class="label label-danger">' . $languageUnavailableWarning . '</span><br /><br />' . $languageCode;
716  }
717  return $languageCode;
718  }
719 
726  public function ‪renderStartModuleSelect()
727  {
728  // Load available backend modules
729  $backendUser = $this->‪getBackendUser();
730  $language = $this->‪getLanguageService();
731  $loadModules = GeneralUtility::makeInstance(ModuleLoader::class);
732  $loadModules->observeWorkspaces = true;
733  $loadModules->load(‪$GLOBALS['TBE_MODULES']);
734  $startModuleSelect = '<option value="">' . htmlspecialchars($language->getLL('startModule.firstInMenu')) . '</option>';
735  foreach ($loadModules->modules as $mainMod => $modData) {
736  if (!empty($modData['sub']) && is_array($modData['sub'])) {
737  $modules = '';
738  foreach ($modData['sub'] as $subData) {
739  $modName = $subData['name'];
740  $modules .= '<option value="' . htmlspecialchars($modName) . '"';
741  $modules .= $backendUser->uc['startModule'] === $modName ? ' selected="selected"' : '';
742  $modules .= '>' . htmlspecialchars($language->sL($loadModules->getLabelsForModule($modName)['title'])) . '</option>';
743  }
744  $groupLabel = htmlspecialchars($language->sL($loadModules->getLabelsForModule($mainMod)['title']));
745  $startModuleSelect .= '<optgroup label="' . htmlspecialchars($groupLabel) . '">' . $modules . '</optgroup>';
746  }
747  }
748  return '<select id="field_startModule" name="data[startModule]" class="form-control">' . $startModuleSelect . '</select>';
749  }
750 
757  public function ‪simulateUser()
758  {
759  trigger_error('SetupModuleController->simulateUser() will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
760  // If admin, allow simulation of another user
761  $this->simUser = 0;
762  $this->simulateSelector = '';
763  unset($this->OLD_BE_USER);
764  $currentBeUser = $this->‪getBackendUser();
765  if ($currentBeUser->isAdmin()) {
766  $this->simUser = (int)GeneralUtility::_GP('simUser');
767  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
768  $users = $queryBuilder
769  ->select('*')
770  ->from('be_users')
771  ->where(
772  $queryBuilder->expr()->neq(
773  'uid',
774  $queryBuilder->createNamedParameter($currentBeUser->user['uid'], \PDO::PARAM_INT)
775  ),
776  $queryBuilder->expr()->notLike(
777  'username',
778  $queryBuilder->createNamedParameter(
779  $queryBuilder->escapeLikeWildcards('_cli_') . '%',
780  \PDO::PARAM_STR
781  )
782  )
783  )
784  ->orderBy('username')
785  ->execute()
786  ->fetchAll();
787  $opt = [];
788  foreach ($users as $rr) {
789  $label = $rr['username'] . ($rr['realName'] ? ' (' . $rr['realName'] . ')' : '');
790  $opt[] = '<option value="' . (int)$rr['uid'] . '"' . ($this->simUser === (int)$rr['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
791  }
792  if (!empty($opt)) {
793  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
794  $this->simulateSelector = '<select id="field_simulate" class="form-control" name="simulateUser" onchange="window.location.href=' . GeneralUtility::quoteJSvalue((string)$uriBuilder->buildUriFromRoute('user_setup') . '&simUser=') . '+this.options[this.selectedIndex].value;"><option></option>' . implode('', $opt) . '</select>';
795  }
796  }
797  // This can only be set if the previous code was executed.
798  if ($this->simUser > 0) {
799  // Save old user...
800  $this->OLD_BE_USER = $currentBeUser;
801  // Unset current
802  // New backend user object
803  $currentBeUser = GeneralUtility::makeInstance(BackendUserAuthentication::class);
804  $currentBeUser->setBeUserByUid($this->simUser);
805  $currentBeUser->fetchGroupData();
806  $currentBeUser->backendSetUC();
807  }
808  }
809 
816  protected function ‪checkAccess(array $config)
817  {
818  $access = $config['access'];
819 
820  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['setup']['accessLevelCheck'][$access])) {
821  if (class_exists($access)) {
822  $accessObject = GeneralUtility::makeInstance($access);
823  if (method_exists($accessObject, 'accessLevelCheck')) {
824  // Initialize vars. If method fails, $set will be set to FALSE
825  return $accessObject->accessLevelCheck($config);
826  }
827  }
828  } elseif ($access === 'admin') {
829  return ‪$this->isAdmin;
830  }
831 
832  return false;
833  }
834 
843  protected function ‪getLabel($str, $key = '', $addLabelTag = true)
844  {
845  if (strpos($str, 'LLL:') === 0) {
846  $out = htmlspecialchars($this->‪getLanguageService()->sL($str));
847  } else {
848  $out = htmlspecialchars($str);
849  }
850  if (isset($this->overrideConf[$key ?: $str])) {
851  $out = '<span style="color:#999999">' . $out . '</span>';
852  }
853  if ($addLabelTag) {
854  $out = '<label>' . $out . '</label>';
855  }
856  return $out;
857  }
858 
866  protected function ‪getCSH($str, $label)
867  {
868  $context = '_MOD_user_setup';
869  $field = $str;
870  $strParts = explode(':', $str);
871  if (count($strParts) > 1) {
872  // Setting comes from another extension
873  $context = $strParts[0];
874  $field = $strParts[1];
875  } elseif ($str !== 'language' && $str !== 'simuser' && $str !== 'reset') {
876  $field = 'option_' . $str;
877  }
878  return ‪BackendUtility::wrapInHelp($context, $field, $label);
879  }
880 
887  protected function ‪getFieldsFromShowItem()
888  {
889  $allowedFields = GeneralUtility::trimExplode(',', ‪$GLOBALS['TYPO3_USER_SETTINGS']['showitem'], true);
890  if ($this->isAdmin) {
891  // Do not ask for current password if admin (unknown for other users and no security gain)
892  $key = array_search('passwordCurrent', $allowedFields);
893  if ($key !== false) {
894  unset($allowedFields[$key]);
895  }
896  }
897 
898  $backendUser = $this->‪getBackendUser();
899  $systemMaintainers = array_map('intval', ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers'] ?? []);
900  $isCurrentUserInSystemMaintainerList = in_array((int)$backendUser->user['uid'], $systemMaintainers, true);
901  $isInSimulateUserMode = (int)$backendUser->user['ses_backuserid'] !== 0;
902  if ($isInSimulateUserMode && $isCurrentUserInSystemMaintainerList) {
903  // DataHandler denies changing password of system maintainer users in switch user mode.
904  // Do not show the password fields is this case.
905  $key = array_search('password', $allowedFields);
906  if ($key !== false) {
907  unset($allowedFields[$key]);
908  }
909  $key = array_search('password2', $allowedFields);
910  if ($key !== false) {
911  unset($allowedFields[$key]);
912  }
913  }
914 
915  if (!is_array($this->tsFieldConf)) {
916  return $allowedFields;
917  }
918  foreach ($this->tsFieldConf as $fieldName => $userTsFieldConfig) {
919  if (!empty($userTsFieldConfig['disabled'])) {
920  $fieldName = rtrim($fieldName, '.');
921  $key = array_search($fieldName, $allowedFields);
922  if ($key !== false) {
923  unset($allowedFields[$key]);
924  }
925  }
926  }
927  return $allowedFields;
928  }
929 
936  protected function ‪getAvatarFileUid($beUserId)
937  {
938  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_file_reference');
939  $file = $queryBuilder
940  ->select('uid_local')
941  ->from('sys_file_reference')
942  ->where(
943  $queryBuilder->expr()->eq(
944  'tablenames',
945  $queryBuilder->createNamedParameter('be_users', \PDO::PARAM_STR)
946  ),
947  $queryBuilder->expr()->eq(
948  'fieldname',
949  $queryBuilder->createNamedParameter('avatar', \PDO::PARAM_STR)
950  ),
951  $queryBuilder->expr()->eq(
952  'table_local',
953  $queryBuilder->createNamedParameter('sys_file', \PDO::PARAM_STR)
954  ),
955  $queryBuilder->expr()->eq(
956  'uid_foreign',
957  $queryBuilder->createNamedParameter($beUserId, \PDO::PARAM_INT)
958  )
959  )
960  ->execute()
961  ->fetchColumn();
962  return (int)$file;
963  }
964 
972  protected function ‪setAvatarFileUid($beUserId, $fileUid, array &$storeRec)
973  {
974 
975  // Update is only needed when new fileUid is set
976  if ((int)$fileUid === $this->‪getAvatarFileUid($beUserId)) {
977  return;
978  }
979 
980  // If user is not allowed to modify avatar $fileUid is empty - so don't overwrite existing avatar
981  if (empty($fileUid)) {
982  return;
983  }
984 
985  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_file_reference');
986  $queryBuilder->getRestrictions()->removeAll();
987  $queryBuilder
988  ->delete('sys_file_reference')
989  ->where(
990  $queryBuilder->expr()->eq(
991  'tablenames',
992  $queryBuilder->createNamedParameter('be_users', \PDO::PARAM_STR)
993  ),
994  $queryBuilder->expr()->eq(
995  'fieldname',
996  $queryBuilder->createNamedParameter('avatar', \PDO::PARAM_STR)
997  ),
998  $queryBuilder->expr()->eq(
999  'table_local',
1000  $queryBuilder->createNamedParameter('sys_file', \PDO::PARAM_STR)
1001  ),
1002  $queryBuilder->expr()->eq(
1003  'uid_foreign',
1004  $queryBuilder->createNamedParameter($beUserId, \PDO::PARAM_INT)
1005  )
1006  )
1007  ->execute();
1008 
1009  // If Avatar is marked for delete => set it to empty string so it will be updated properly
1010  if ($fileUid === 'delete') {
1011  $fileUid = '';
1012  }
1013 
1014  // Create new reference
1015  if ($fileUid) {
1016 
1017  // Get file object
1018  try {
1020  } catch (FileDoesNotExistException $e) {
1021  $file = false;
1022  }
1023 
1024  // Check if user is allowed to use the image (only when not in simulation mode)
1025  if ($file && $this->simUser === 0 && !$file->getStorage()->checkFileActionPermission('read', $file)) {
1026  $file = false;
1027  }
1028 
1029  // Check if extension is allowed
1030  if ($file && GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $file->getExtension())) {
1031 
1032  // Create new file reference
1033  $storeRec['sys_file_reference']['NEW1234'] = [
1034  'uid_local' => (int)$fileUid,
1035  'uid_foreign' => (int)$beUserId,
1036  'tablenames' => 'be_users',
1037  'fieldname' => 'avatar',
1038  'pid' => 0,
1039  'table_local' => 'sys_file',
1040  ];
1041  $storeRec['be_users'][(int)$beUserId]['avatar'] = 'NEW1234';
1042  }
1043  }
1044  }
1045 
1051  protected function ‪addAvatarButtonJs($fieldName)
1052  {
1053  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
1054  $this->moduleTemplate->addJavaScriptCode('avatar-button', '
1055  var browserWin="";
1056 
1057  function openFileBrowser() {
1058  var url = ' . GeneralUtility::quoteJSvalue((string)$uriBuilder->buildUriFromRoute('wizard_element_browser', ['mode' => 'file', 'bparams' => '||||dummy|setFileUid'])) . ';
1059  browserWin = window.open(url,"Typo3WinBrowser","height=650,width=800,status=0,menubar=0,resizable=1,scrollbars=1");
1060  browserWin.focus();
1061  }
1063  function clearExistingImage() {
1064  $(' . GeneralUtility::quoteJSvalue('#image_' . htmlspecialchars($fieldName)) . ').hide();
1065  $(' . GeneralUtility::quoteJSvalue('#clear_button_' . htmlspecialchars($fieldName)) . ').hide();
1066  $(' . GeneralUtility::quoteJSvalue('#field_' . htmlspecialchars($fieldName)) . ').val(\'delete\');
1067  }
1068 
1069  function setFileUid(field, value, fileUid) {
1070  clearExistingImage();
1071  $(' . GeneralUtility::quoteJSvalue('#field_' . htmlspecialchars($fieldName)) . ').val(fileUid);
1072  $(' . GeneralUtility::quoteJSvalue('#add_button_' . htmlspecialchars($fieldName)) . ').removeClass(\'btn-default\').addClass(\'btn-info\');
1073 
1074  browserWin.close();
1075  }
1076  ');
1077  }
1078 
1084  protected function ‪getBackendUser()
1085  {
1086  return ‪$GLOBALS['BE_USER'];
1087  }
1088 
1094  protected function ‪getLanguageService()
1095  {
1096  return ‪$GLOBALS['LANG'];
1097  }
1098 
1102  protected function ‪addFlashMessages()
1103  {
1104  $flashMessages = [];
1105 
1106  // Show if setup was saved
1107  if ($this->setupIsUpdated && !$this->settingsAreResetToDefault) {
1108  $flashMessages[] = $this->‪getFlashMessage('setupWasUpdated', 'UserSettings');
1109  }
1110 
1111  // Show if temporary data was cleared
1112  if ($this->settingsAreResetToDefault) {
1113  $flashMessages[] = $this->‪getFlashMessage('settingsAreReset', 'resetConfiguration');
1114  }
1115 
1116  // Notice
1117  if ($this->setupIsUpdated || $this->settingsAreResetToDefault) {
1118  $flashMessages[] = $this->‪getFlashMessage('activateChanges', '', ‪FlashMessage::INFO);
1119  }
1120 
1121  // If password is updated, output whether it failed or was OK.
1122  if ($this->passwordIsSubmitted) {
1123  switch ($this->passwordIsUpdated) {
1125  $flashMessages[] = $this->‪getFlashMessage('oldPassword_failed', 'newPassword', ‪FlashMessage::ERROR);
1126  break;
1128  $flashMessages[] = $this->‪getFlashMessage('newPassword_failed', 'newPassword', ‪FlashMessage::ERROR);
1129  break;
1131  $flashMessages[] = $this->‪getFlashMessage('newPassword_ok', 'newPassword');
1132  break;
1133  }
1134  }
1135  if (!empty($flashMessages)) {
1136  $this->‪enqueueFlashMessages($flashMessages);
1137  }
1138  }
1139 
1144  protected function ‪enqueueFlashMessages(array $flashMessages)
1145  {
1146  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
1147  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
1148  foreach ($flashMessages as $flashMessage) {
1149  $defaultFlashMessageQueue->enqueue($flashMessage);
1150  }
1151  }
1152 
1159  protected function ‪getFlashMessage($message, $title, $severity = ‪FlashMessage::OK)
1160  {
1161  $title = !empty($title) ? $this->‪getLanguageService()->getLL($title) : ' ';
1162  return GeneralUtility::makeInstance(
1163  FlashMessage::class,
1164  $this->‪getLanguageService()->getLL($message),
1165  $title,
1166  $severity
1167  );
1168  }
1169 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:81
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getFieldsFromShowItem
‪string[] getFieldsFromShowItem()
Definition: SetupModuleController.php:865
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getFormProtection
‪TYPO3 CMS Core FormProtection BackendFormProtection getFormProtection()
Definition: SetupModuleController.php:198
‪TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory
Definition: PasswordHashFactory.php:25
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:72
‪TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData
‪storeIncomingData()
Definition: SetupModuleController.php:209
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$content
‪string $content
Definition: SetupModuleController.php:103
‪TYPO3\CMS\Core\Core\Environment\getLabelsPath
‪static string getLabelsPath()
Definition: Environment.php:209
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_OLD_WRONG
‪const PASSWORD_OLD_WRONG
Definition: SetupModuleController.php:70
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getFlashMessage
‪FlashMessage getFlashMessage($message, $title, $severity=FlashMessage::OK)
Definition: SetupModuleController.php:1137
‪TYPO3\CMS\Backend\Utility\BackendUtility\setUpdateSignal
‪static setUpdateSignal($set='', $params='')
Definition: BackendUtility.php:3164
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$overrideConf
‪array $overrideConf
Definition: SetupModuleController.php:107
‪TYPO3\CMS\Setup\Controller\SetupModuleController
Definition: SetupModuleController.php:49
‪TYPO3\CMS\Core\Crypto\PasswordHashing\InvalidPasswordHashException
Definition: InvalidPasswordHashException.php:22
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$passwordIsUpdated
‪int $passwordIsUpdated
Definition: SetupModuleController.php:136
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$languageUpdate
‪bool $languageUpdate
Definition: SetupModuleController.php:116
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService
‪TYPO3 CMS Core Localization LanguageService getLanguageService()
Definition: SetupModuleController.php:1072
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_UPDATED
‪const PASSWORD_UPDATED
Definition: SetupModuleController.php:59
‪TYPO3\CMS\Core\Resource\ResourceFactory\getInstance
‪static ResourceFactory getInstance()
Definition: ResourceFactory.php:39
‪TYPO3\CMS\Backend\Backend\Avatar\DefaultAvatarProvider
Definition: DefaultAvatarProvider.php:28
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:29
‪TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException
Definition: FileDoesNotExistException.php:21
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:31
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$moduleTemplate
‪ModuleTemplate $moduleTemplate
Definition: SetupModuleController.php:174
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$setupIsUpdated
‪bool $setupIsUpdated
Definition: SetupModuleController.php:144
‪TYPO3\CMS\Setup\Controller\SetupModuleController\mainAction
‪ResponseInterface mainAction(ServerRequestInterface $request)
Definition: SetupModuleController.php:421
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderLanguageSelect
‪string renderLanguageSelect()
Definition: SetupModuleController.php:658
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getLabel
‪string getLabel($str, $key='', $addLabelTag=true)
Definition: SetupModuleController.php:821
‪TYPO3\CMS\Backend\Utility\BackendUtility\wrapInHelp
‪static string wrapInHelp($table, $field, $text='', array $overloadHelpText=[])
Definition: BackendUtility.php:2519
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$formProtection
‪TYPO3 CMS Core FormProtection BackendFormProtection $formProtection
Definition: SetupModuleController.php:154
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:40
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$isAdmin
‪bool $isAdmin
Definition: SetupModuleController.php:124
‪TYPO3\CMS\Setup\Controller\SetupModuleController\init
‪init()
Definition: SetupModuleController.php:336
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$deprecatedPublicProperties
‪array $deprecatedPublicProperties
Definition: SetupModuleController.php:76
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getJavaScript
‪string getJavaScript()
Definition: SetupModuleController.php:357
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$saveData
‪bool $saveData
Definition: SetupModuleController.php:132
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_NOT_UPDATED
‪const PASSWORD_NOT_UPDATED
Definition: SetupModuleController.php:54
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser
‪TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser()
Definition: SetupModuleController.php:1062
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$passwordIsSubmitted
‪bool $passwordIsSubmitted
Definition: SetupModuleController.php:140
‪TYPO3\CMS\Setup\Controller\SetupModuleController\__construct
‪__construct()
Definition: SetupModuleController.php:179
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:35
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:33
‪$locales
‪$locales
Definition: be_users.php:6
‪TYPO3\CMS\Backend\Module\ModuleLoader
Definition: ModuleLoader.php:32
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getCSH
‪string getCSH($str, $label)
Definition: SetupModuleController.php:844
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getButtons
‪getButtons()
Definition: SetupModuleController.php:432
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:45
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup
‪array renderUserSetup()
Definition: SetupModuleController.php:466
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$OLD_BE_USER
‪$OLD_BE_USER
Definition: SetupModuleController.php:112
‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
Definition: PublicMethodDeprecationTrait.php:68
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Setup\Controller\SetupModuleController\simulateUser
‪simulateUser()
Definition: SetupModuleController.php:735
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$moduleName
‪string $moduleName
Definition: SetupModuleController.php:168
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:26
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$settingsAreResetToDefault
‪bool $settingsAreResetToDefault
Definition: SetupModuleController.php:148
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:45
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:39
‪TYPO3\CMS\Core\Resource\ResourceFactory\getFileObject
‪File getFileObject($uid, array $fileData=[])
Definition: ResourceFactory.php:399
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$MOD_MENU
‪array $MOD_MENU
Definition: SetupModuleController.php:95
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_NOT_THE_SAME
‪const PASSWORD_NOT_THE_SAME
Definition: SetupModuleController.php:64
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderStartModuleSelect
‪string renderStartModuleSelect()
Definition: SetupModuleController.php:704
‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
Definition: PublicPropertyDeprecationTrait.php:66
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$simUser
‪int $simUser
Definition: SetupModuleController.php:162
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$pagetreeNeedsRefresh
‪bool $pagetreeNeedsRefresh
Definition: SetupModuleController.php:120
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Setup\Controller\SetupModuleController\enqueueFlashMessages
‪enqueueFlashMessages(array $flashMessages)
Definition: SetupModuleController.php:1122
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$MOD_SETTINGS
‪array $MOD_SETTINGS
Definition: SetupModuleController.php:99
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$deprecatedPublicMethods
‪array $deprecatedPublicMethods
Definition: SetupModuleController.php:87
‪TYPO3\CMS\Setup\Controller\SetupModuleController\addAvatarButtonJs
‪addAvatarButtonJs($fieldName)
Definition: SetupModuleController.php:1029
‪TYPO3\CMS\Setup\Controller
Definition: SetupModuleController.php:2
‪TYPO3\CMS\Setup\Controller\SetupModuleController\setAvatarFileUid
‪setAvatarFileUid($beUserId, $fileUid, array &$storeRec)
Definition: SetupModuleController.php:950
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:25
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$tsFieldConf
‪array $tsFieldConf
Definition: SetupModuleController.php:128
‪TYPO3\CMS\Setup\Controller\SetupModuleController\main
‪main()
Definition: SetupModuleController.php:370
‪TYPO3\CMS\Setup\Controller\SetupModuleController\checkAccess
‪bool checkAccess(array $config)
Definition: SetupModuleController.php:794
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getAvatarFileUid
‪int getAvatarFileUid($beUserId)
Definition: SetupModuleController.php:914
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$simulateSelector
‪string $simulateSelector
Definition: SetupModuleController.php:158
‪TYPO3\CMS\Core\Http\HtmlResponse
Definition: HtmlResponse.php:25
‪TYPO3\CMS\Setup\Controller\SetupModuleController\addFlashMessages
‪addFlashMessages()
Definition: SetupModuleController.php:1080