Skip to content

Commit

Permalink
Merge pull request #36 from djcprinse/master
Browse files Browse the repository at this point in the history
Show user settings in TYPO3 v10
  • Loading branch information
bmack authored Dec 18, 2020
2 parents c7eb52c + e966d14 commit 25854bc
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 25854bc

Please sign in to comment.