Statistics: Posted by CincyPlanet — September 14th, 2011, 5:12 pm
Statistics: Posted by CincyPlanet — September 13th, 2011, 8:17 pm
<?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. */
}
}
?>
Statistics: Posted by Jason Caldwell — September 13th, 2011, 7:53 pm
Statistics: Posted by CincyPlanet — September 13th, 2011, 6:39 pm
Statistics: Posted by Jason Caldwell — September 13th, 2011, 3:00 pm
Statistics: Posted by Jason Caldwell — September 12th, 2011, 4:56 pm
Statistics: Posted by CincyPlanet — September 10th, 2011, 1:08 pm
Statistics: Posted by CincyPlanet — September 10th, 2011, 7:12 am
<?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
Statistics: Posted by Jason Caldwell — September 9th, 2011, 7:10 pm
Statistics: Posted by Cristián Lávaque — September 9th, 2011, 1:56 am
Statistics: Posted by CincyPlanet — September 8th, 2011, 7:09 pm