[pmwiki-users] authgroup does not work

Patrick R. Michaud pmichaud at pobox.com
Sat Jun 9 22:47:12 CDT 2007


On Sun, Jun 10, 2007 at 01:54:10AM +0200, info at hassanein.ch wrote:
> Quoting "Patrick R. Michaud" <pmichaud at pobox.com>:
> 
> >On Sat, Jun 09, 2007 at 05:52:23PM +0200, info at hassanein.ch wrote:
> >>I have created some user groups in Site.AuthUser.
> >>
> >>If I put the following lines into a page, it is always true, meaning
> >>even if the user is not in my_group.
> >>
> >>(:if authgroup @my_group:)
> >>show this only if you are in my_group
> >>(:ifend:)
> >>
> >>What am I doing wrong here?
> >
> >The "authgroup" condition isn't part of the core -- it
> >requires a local customization:
> >
> >    $Conditions['authgroup'] = '$GLOBALS["AuthList'][$condparm] > 0';
> Thanks very much for your help, I lost hours...
> Nevertheless I do not fully understand the above line, I assume I have  
> to put that into config.php - if so, how do I have to interpret this  
> line? Is there a typo or do I have to adapt anything?

Oh, there's a typo.  Sorry -- the correct line is:

  $Conditions['authgroup'] = '$GLOBALS["AuthList"][$condparm] > 0';

Adding this line to config.php should cause (:if authgroup ...:)
to work properly.

Pm



More information about the pmwiki-users mailing list