[TYPO3] fe_user->groupData[TSconfig]

Sander van Gelderen mail at sandervangelderen.nl
Sun Dec 16 18:44:09 CET 2007


Hello list,

On my site, I want to redirect users to different pages depending on the 
TSConfig of their group(s).

I am writing an extension to do this.

If I dump $GLOBALS['TSFE']->fe_user->groupData[TSconfig] to the screen, 
I get the following:

///////////////cut///////////////////
Array
(
     [4] => myExt {
  foo = bar
}
     [7] => myExt {
  foo = fubar
}
)
///////////////paste///////////////////

I notice that the keys in this array are the uid's of the group(s). The 
entries are sorted in numerical order of the keys.

This user is a member of these two groups (more may follow later). You 
can order the groups a user is a member of, and that is important to me. 
The order in this case is 7,4.

I am looking for a way to get the merged values, in this example the 
final value of 'foo' should be 'bar'.

I can imagine how to do this by querying the 'sorting' field of each 
group and then merging the arrays in that order before I feed the string 
to my t3lib_tsparser object, but I think there must be some API for this 
already?

I appreciate your help if you can point me in the right way.

TIA

Sander


More information about the TYPO3-english mailing list