3 Allows access using XML User Profiles (XUP/XProfile). Requires $_SESSION support.
6 #-- init hack (runs slow without)
7 if (!constant("SESSION_ID") && !session_id()) {
12 $ewiki_plugins["auth_userdb"][] = "ewiki_auth_userdb_xprofile";
14 function ewiki_auth_userdb_xprofile($username, $password) {
18 if ($_SESSION["xprofile"]) {
19 $ewiki_author = $_SESSION["ewiki_author"];
24 $xpro = new xprofile($username); // URL or email-like shortcut
28 if ($xpro->login() ) {
31 $_SESSION["ewiki_author"] = $ewiki_author = $xpro->info["nickname"];
32 $_SESSION["xprofile"] = $xpro->url;
37 // misuse (already logged by XProfile manager)
38 ewiki_log("userdb_xprofile: wrong password '...' for remote account on '$username'", 1);