Thanks for the heads up on this thread :-)
Regarding Single-Sign-On functionality…
s2Member integrates seamlessly with WordPress, so all of the WordPress framework functions like this one, which I would consider strongly in this type of integration, will work just fine for you. See: http://codex.wordpress.org/Function_Reference/wp_authenticate
So how might you go about this? I would create an MU plugin for WordPress that logs someone in using an encrypted username/password combo, and perhaps call upon that in a hidden image tag, or in some way that allows cookies to be set for the WordPress-driven portion of your site, upon logging into another area of your site, which maybe is NOT driven by WordPress.
Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)
<?php
add_action('init', 'single_sign_on_handler');
function single_sign_on_handler()
{
if(!empty($_GET['ss_username']) && !empty($_GET['ss_password']))
{
wp_authenticate($_GET['ss_username'], $_GET['ss_password']);
// The user is now logged-in, if the values were correct.
// Let's display an image.
header('Content-Type: image/gif');
echo base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
}
}
[/hilite]
Now... you might call upon this single-sign-on handler in your other applications,
by displaying a hidden image tag, that looks something like this.
[hilite pre_code]
<img src="http://example.com/wordpress/?ss_username=johnsmith&ss_password=password" width="1" height="1" />
Of course, this is a crude example. If I were setting this up, I would be ABSOLUTELY sure that the values of ss_username and ss_password were encrypted before displaying them in an IMG tag. You might also want to build in an encrypted hash, to ensure the data is coming from your own application, and is not a hacking attempt.