We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tx_begroupsroles_role
When simulating a user login via the users module the following happens in SwitchUserRoleHook->setUserGroup():
SwitchUserRoleHook->setUserGroup()
tx_begroupsroles_role===null
tx_begroupsroles_groups
When simulating another user (that hasn't logged in before!!) the session is still holding that tx_begroupsroles_role and this skips the dermination of tx_begroupsroles_groups and that leads to an error in https://github.com/IchHabRecht/begroups_roles/blob/master/Classes/Hook/SwitchUserRoleHook.php#L90
$possibleUsergroups = GeneralUtility::intExplode(',', $this->backendUser->user['tx_begroupsroles_groups'], true);
PHP Runtime Deprecation Notice: explode(): Passing null to parameter #2 ($string) of type string is deprecated in GeneralUtility.php line 936
I believe that this error only occurs when simulating users, not when users regularly log in and use the whole role-feature.
A possible solution might be to hook into the exit-simulation part (EXT:backend/Controller/SwitchUserController->exitSwitchUserAction()) and do this:
EXT:backend/Controller/SwitchUserController->exitSwitchUserAction()
$sessionObject->set('backuserid', null); + $sessionObject->set('tx_begroupsroles_role', null);
The text was updated successfully, but these errors were encountered:
👀
Sorry, something went wrong.
No branches or pull requests
When simulating a user login via the users module the following happens in
SwitchUserRoleHook->setUserGroup()
:tx_begroupsroles_role
is read from the sessiontx_begroupsroles_role===null
(that's the case when the user has never logged in) thentx_begroupsroles_groups
is being calculatedtx_begroupsroles_groups
is set as thetx_begroupsroles_role
in the sessionWhen simulating another user (that hasn't logged in before!!) the session is still holding that
tx_begroupsroles_role
and this skips the dermination oftx_begroupsroles_groups
and that leads to an error in https://github.com/IchHabRecht/begroups_roles/blob/master/Classes/Hook/SwitchUserRoleHook.php#L90I believe that this error only occurs when simulating users, not when users regularly log in and use the whole role-feature.
A possible solution might be to hook into the exit-simulation part (
EXT:backend/Controller/SwitchUserController->exitSwitchUserAction()
) and do this:$sessionObject->set('backuserid', null); + $sessionObject->set('tx_begroupsroles_role', null);
The text was updated successfully, but these errors were encountered: