PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
add_action ("init", "s2_user_pass_ok");
function s2_user_pass_ok ()
{
if (isset ($_GET[__FUNCTION__]) && $_GET[__FUNCTION__] === "xxxxx-something-secret-xxxxx")
{
if (user_pass_ok ($_GET["s2_username"], $_GET["s2_password"]))
exit ("1");
else
exit ("0");
}
}
?>
http://example.com/?s2_user_pass_ok=xxxxx-something-secret-xxxxx&s2_username=johndoe&s2_password=password
<?php
add_action ("init", "s2_user_pass_ok");
function s2_user_pass_ok ()
{
if (isset ($_GET[__FUNCTION__]) && $_GET[__FUNCTION__] === "xxxxx-something-secret-xxxxx")
{
status_header (200); header ("Content-Type: text/plain; charset=utf-8"); while (@ob_end_clean ());
/**/
if (user_pass_ok ($_GET["s2_username"], $_GET["s2_password"]))
{
$user = new WP_User ($_GET["s2_username"]);
$role = c_ws_plugin__s2member_user_access::user_access_role ($user);
$level = c_ws_plugin__s2member_user_access::user_access_level ($user);
exit ((string)$level); /* 0-4, or up to the number of configured Levels. */
}
else
exit ("-"); /* Not a valid Username/Password combination. */
}
}
?>
Users browsing this forum: Google [Bot] and 1 guest