[pmwiki-users] action=setuser

Patrick Ogay lists at basel-inside.ch
Fri Nov 11 00:41:57 CST 2005

I wrote an interface to authuser, so we can assign users to ".htpasswd"  
through the web
It works nicely - with the -b  it's possible to  assign a user without 
being prompted (htpasswd -b $pwfile $1 $2)

Is it possible to restrict the access to this function "setuser"? (Admin 
or better Admin and user itself)

Patrick Ogay

## Addons/User Actions
##adds action=setuser&user=user&passwd=passwd
## uses php "system" to execute a shellscript  in usr/local/bib
global $HandleActions;
SDV($HandleActions['setuser'], 'setUser');
function setUser($pagename) {
 echo "setuser".$_GET[user].$_GET[passwd];
 if ($_GET[user] && $_GET[passwd]){
   $cmd = "_htpasswd ".$_GET[user]." ".$_GET[passwd];
   echo "=$cmd=";
   system($cmd, $result);  
   /* $return = `cmd`; */
   echo "result=$result/";
 else { /* alles listen */
  echo "result=$result/";

More information about the pmwiki-users mailing list