AfterGroupsResolvedEvent¶
When user groups are loaded, for example when a backend editor's groups and permissions
are calculated, a new PSR-14 event After
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
.
Example¶
Note
Currently, we do not have an example for this event. If you can provide a useful one, please open an issue with your code snippets or a pull request.
API¶
- class AfterGroupsResolvedEvent ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Core\ Authentication\ Event\ After Groups Resolved Event
Event fired after user groups have been resolved for a specific user
- getSourceDatabaseTable ( ) ¶
-
- Return description
-
'be_groups' or 'fe_groups' depending on context.
- Returns
-
string
- getGroups ( ) ¶
-
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 - sub groups are listed before the group that includes the sub group.
- Returns
-
array
- setGroups ( array $groups) ¶
-
List of group records as manipulated by the event.
- param $groups
-
the groups
- getOriginalGroupIds ( ) ¶
-
List of group uids directly attached to the user
- Returns
-
array
- getUserData ( ) ¶
-
Full user record with all fields
- Returns
-
array