[pmwiki-users] hide links for certain groups

Randy Brown alongkiss at aprivatespot.com
Fri Apr 1 11:21:07 CDT 2011


Hans,

Thanks for the explanation of $AuthList. I see the $AuthList array contains the groups to which the currently logged in user belongs. 

What I'm wondering is different: how to tell within config whether an AuthUser group includes an arbitrary member.

For example, suppose the logged in user is Robert. How would a function in config return the correct answer about whether or not id:Randy belongs to @PHPsmarties? 

For example:

if (isMemberOfPHPSmarties("id:Randy")) {
     echo "FYI ".$AuthId.", Randy belongs to @PHPsmarties";
} else {
     echo "FYI ".$AuthId.", Randy does not belong to @PHPsmarties"; 
}

function isMemberOfPHPSmarties( $str ) {
     return(....what code goes here?....);
}



On Apr 1, 2011, at 10:18 AM, Hans wrote:

> Friday, April 1, 2011, 3:48:08 PM, Randy Brown wrote:
> 
>> But how would you test for authuser group membership using PHP code within config?
> 
> the $AuthList array holds the information.




More information about the pmwiki-users mailing list