You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume, you have different authentication mechanism (e.g. SSO) and want to remove changing password in User Settings (or remove entire "Account security" tab.
On the page "Extending the user settings" there is an example for adding something with the convenience function addFieldsToUserSettings.
I am not sure if there is an equivalent function for removing settings from the user settings.
You could (for example) do something like this but seems like a hack:
ext_tables.php
// remove entire
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
'--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:accountSecurity,passwordCurrent,password,password2,mfaProviders,',
'', $GLOBALS['TYPO3_USER_SETTINGS']['showitem']);
// or better per regex:
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = preg_replace(
'#--div--;LLL:EXT:setup\/Resources\/Private\/Language\/locallang.xlf:accountSecurity((?!--div--;).)*#',
'', $GLOBALS['TYPO3_USER_SETTINGS']['showitem']);
Should ideally be an API function in TYPO3 or at least have an example in the documentation?
The text was updated successfully, but these errors were encountered:
Hmm, this is indeed very hacky. I would avoid documenting it as it may break in major TYPO3 upgrades (think of renaming one of the provided fields or adding one in between or just a space after the comma added).
When we agree to document something like this, this should be a more generic approach. I used it in my projects, for example, to change the existing pages TCA for custom doktypes. And there should be a BIG disclaimer above it, something like: "Use at own risk, this may break anytime. You should know what you do!"
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/UserSettingsConfiguration/Index.html
Assume, you have different authentication mechanism (e.g. SSO) and want to remove changing password in User Settings (or remove entire "Account security" tab.
On the page "Extending the user settings" there is an example for adding something with the convenience function addFieldsToUserSettings.
I am not sure if there is an equivalent function for removing settings from the user settings.
You could (for example) do something like this but seems like a hack:
ext_tables.php
Should ideally be an API function in TYPO3 or at least have an example in the documentation?
The text was updated successfully, but these errors were encountered: