[pmwiki-users] login with user names

Hans design5 at softflow.co.uk
Fri Feb 23 15:53:56 CST 2007


Can I use authuser to require users logging in with name and password,
without keeping  a list of user names, and hand out a general edit
password instead? I would like the logged in user name used as $Author
and set as author cookie.

I tried this in config.php (no authuser.php loaded):

# let Site.AuthForm know that we want an authid field (no authuser script loaded)
# and set $Author to login name
$EnableAuthUser = 1;
if (@$_POST['authid']) {
      $AuthID = stripmagic($_POST['authid']);
      $Author = $AuthId;
      setcookie('author',$Author,0,'/');
      }
include_once("$FarmD/scripts/author.php");
$DefaultPasswords['edit'] = crypt('mypassword');

From a ?action=login link I get a log-in prompt(name and password),
and it logs me in, but then displays the prompt again, instead of
the home page.
  
Thanks for any help!

 Hans




More information about the pmwiki-users mailing list