[TYPO3] showAccessRestrictedPages and realurl

Antonio Reher areher at sonoratec.biz
Mon Jun 9 19:02:39 CEST 2008


Yep, problem solved. Name of userFunc was different from function 
definition... glabs! sorry.

Antonio

Antonio Reher wrote:
> Nope, sorry. It seems that
>
> $GLOBALS["TSFE"]->fe_user->user["usergroup"]
>
> in my comparison function is always 0, regardless of login... :(
>
>
> Here is my TS:
> lib.galeria = TEXT
> [userFunc = user_usergroup_not(1)]
> lib.galeria.value = group is 1
> [else]
> lib.galeria.value = group is not 1
> [global]
>
> Here is my function (in localconf.php):
> function user_checkusergroup_not($value) {
>             $TSFE->set_no_cache();
>             if ($GLOBALS["TSFE"]->fe_user->user["usergroup"] !== $value) 
> return true;
>             else return false;
> }
>
> So I always get "group is not 1".
>
> Anybody have any ideas?
> Antonio
>
>
> Antonio Reher wrote:
>   
>> Got it solved, because my userFunc has access to 
>> $GLOBALS["TSFE"]->fe_user->user["usergroup"].
>>
>> thanks everybody!!
>>
>> Antonio Reher wrote:
>>   
>>     
>>> Ok, thanks everybody, I'm getting close to the solution...
>>> so, to test if the usergroup is not equal to, say, 1, in TS i set:
>>> [userFunc = user_usergroup_not(1)]
>>>     lib.galeria.value = usergroup not 1
>>> [else]
>>>     lib.galeria.value = usergroup 1
>>> [global]
>>>
>>> the problem is, how do I access usergroup information from the function 
>>> user_usergroup_not()? Can I pass it along with the parameter 1? 
>>> Something like:
>>> [userFunc = user_usergroup_not(1,{$usergroup})]...
>>>
>>> Thanks
>>>
>>>
>>> Susanne Moog wrote:
>>>   
>>>     
>>>       
>>>> Hi Antonio,
>>>>
>>>> Antonio Reher wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> how can I go about defining my own PHP comparison function? Where do I 
>>>>> define the function?
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> you can use your own function with [userFunc = user_yourfunction()]
>>>>
>>>> and you define it in localconf.php
>>>>
>>>> Reference is: 
>>>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/#id3761045
>>>>
>>>> I think the function has to start with either user_ or tx_, otherwise it 
>>>> won't work.
>>>>
>>>> HTH,
>>>>
>>>> Susanne
>>>> _______________________________________________
>>>> TYPO3-english mailing list
>>>> TYPO3-english at lists.netfielders.de
>>>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>>>   
>>>>     
>>>>       
>>>>         
>>> _______________________________________________
>>> TYPO3-english mailing list
>>> TYPO3-english at lists.netfielders.de
>>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>>   
>>>     
>>>       
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>   
>>     
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>   


More information about the TYPO3-english mailing list