AfterGroupsResolvedEvent

When user groups are loaded, for example when a backend editor’s groups and permissions are calculated, a new PSR-14 event AfterGroupsResolvedEvent is fired.

This event contains a list of retrieved groups from the database which can be modified via event listeners. For example, more groups might be added when a particular user logs in or is seated at a special location.

Hint

This event acts as a substitution for the removed TYPO3 Hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'].

API

getSourceDatabaseTable()

| ReturnType: string |

be_groups or fe_groups depending on the context.

getGroups()

| ReturnType: array |

List of group records including sub groups as resolved by core.

Note

Order is important: A user with main groups “1,2”, where 1 has sub group 3, results in “3,1,2” as record list array since sub groups are listed before the group that includes the sub group.

setGroups(array $groups)

| ReturnType: void |

Set (overwrite) the list of groups.

getOriginalGroupIds()

| ReturnType: array |

List of group uids directly attached to the user.

getUserData()

| ReturnType: array |

Returns the full user record with all fields.