Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show user settings in TYPO3 v10 #36

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Classes/OpenidModuleSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* The TYPO3 project - inspiring people to share!
*/

use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Lang\LanguageService;
use TYPO3\CMS\Core\Localization\LanguageService;

/**
* This class is the OpenID return script for the TYPO3 Backend (used in the user-settings module).
Expand All @@ -31,7 +31,7 @@ class OpenidModuleSetup
*/
public function accessLevelCheck()
{
$setupConfig = $this->getBackendUser()->getTSConfigProp('setup.fields');
$setupConfig = $this->getBackendUser()->getTSConfig()['setup.']['fields.'];
return empty($setupConfig['tx_openid_openid.']['disabled']);
}

Expand All @@ -47,8 +47,9 @@ public function renderOpenID()
$this->getLanguageService()->sL('LLL:EXT:openid/Resources/Private/Language/locallang.xlf:addopenid')
);

$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$parameters = ['P[itemName]' => 'data[be_users][tx_openid_openid]'];
$popUpUrl = GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('wizard_openid', $parameters));
$popUpUrl = GeneralUtility::quoteJSvalue($uriBuilder->buildUriFromRoute('wizard_openid', $parameters));
return '<div class="input-group">' .
'<input id="field_tx_openid_openid"' .
' class="form-control"' .
Expand All @@ -74,7 +75,7 @@ protected function getBackendUser()
}

/**
* @return LanguageService
* @return LanguageService|\TYPO3\CMS\Lang\LanguageService
*/
protected function getLanguageService()
{
Expand Down