[pmwiki-users] Validate login/password
Stéphane Heckel
hsteph at club-internet.fr
Tue Apr 1 12:08:37 CDT 2008
"Hans" wrote :
> from beginning of authuser.php:
I didn't mention that I'm still in my client/server environment. I call this
RPC GetUserInfo function that is supposed to validate the login/password.
Should I really use stripmagic as you mention in your previous post to pass
'authid' and 'authpw' ?
Not sure what should be the content of $pagename ?
Not sure which global variables I should add to make this process consistent
with the 'core' ?.
function GetUserInfo($params) {
global $Author;
$appkeyp=$params->getParam(0); $appkey=$appkeyp->scalarval();
$usernamep=$params->getParam(1); $username=$usernamep->scalarval();
$passwordp=$params->getParam(2); $password=$passwordp->scalarval();
/* if(!ValidateUser($username,$password)) {
return new xmlrpcresp(0, 101, "Invalid username or password");
} */
$EnableAuthUser = 1;
// $_POST['authid']=$username;
$_POST['authpw']=$password;
// $pagename='Main.HomePage';
if(!AuthUserId($pagename, $username, $password)) {
return new xmlrpcresp(0, 101, "Invalid username or password");
}
More information about the pmwiki-users
mailing list