[pmwiki-users] PmWikiAuth Question

The Editor editor at fast.st
Thu Sep 14 21:16:10 CDT 2006


I'm still trying to figure out how PmWikiAuth works.  So far I have
found a couple recipes that suggest the formatting is as below.  This
snippet checks to make sure the "passwd" entered in a form matches the
one on file for "member" and then authenticates the user and is
supposed to set the permissions connected to that password.
Unfortunately I'm still not sure what $level is supposed to represent
or how to set it.  Also are there any declarations or the like I need
to make in this recipe before calling PmWikiAuth?  $pagename is
available.  Everything else is working fine.

		if ($field == "login") {
			$dp = $dataprofiles . "." . $_POST[member];
			$pass1 = GetData($dp,"Password");
			$pass2 = $_POST['passwd'];
			if ($pass1 == $pass2) {			
				AuthUserId($pagename, $_POST['member']);
                                PmWikiAuth($pagename, $level, true)
				$m .= "You have been successfully logged in.  ";
				}
			else Warning("Incorrect member name or password.");
			}
		}

Cheers,
Caveman

PS.  Actually, authentication in FAST Data already works with id based
permissions. But fixing this might help with some Site.AuthForm
problems I've had.  That is I've locked myself out of my site more
than once.  Hehehe.




More information about the pmwiki-users mailing list