If you have a 3rd party application that needs to check if a particular Username is a paying Member of your site (i.e. to test the current status of their account), this hack might be for you. Of course, there are many other ways this could be used, but I'll let this serve as one example that you might follow.
Create this directory and file in your WordPress installation:
(these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
add_action("init", "s2_user_status"); function s2_user_status()
$my_secret_api_key = "my-secret-api-key";
if(isset($_GET["s2_user_status_api_key"], $_GET["s2_username"]) && $_GET["s2_user_status_api_key"] === $my_secret_api_key)
$username = trim(stripslashes((string)$_GET["s2_username"]));
if(is_object($user = new WP_User($username)) && !empty($user->ID))
/* Else exit with "0", NOT a paid Member. */
Now, you might create a script that calls upon this Custom API, and it might look something like this.
$username = "johndoe22";
if($is_paying_member = file_get_contents("http://www.example.com/?s2_user_status_api_key=my-secret-api-key&s2_username=".urlencode($username)))
echo 'Yes, they ARE a paying Member of the site.';