hmm, the strangest thing happened, my posts in this thread disappeared... *ponder* Well, here is the request again.
To repost then:
For functionality I'd request:
login($username, $password)
logout()
Does not display forms or links but are simple back-end functions that will log someone in and out of SMF from an external source. Not from a CMS, not by showing a form that you log into/out of, but something that can be called after including the SSI.php file in your custom login/out page.
<?
require ('path/to/smf/SSI.php');
if(!$_GET['logout'] && $_GET['action'] != 'login' && !is_loggedIn()) { /*...show my custom form... that points back to this file...*/ }
if(!is_loggedIn() && $_GET['action'] == 'login') ssi_login($_POST['username'], $_POST['password']);
if(is_loggedIn() && $_GET['action'] == 'logoff') ssi_logoff();
....
?>
That's the basic idea. I use my own form (or another form that is already created) then I go ahead and use the ssi_login() and ssi_logoff() functions to log the user into SMF at the same time. So if they have a browser window open to the forums, they can hit refresh and they're logged in because the cookies and everything is there. If they logoff and go back to the forum window, they refresh and they're logged out.
Thanks for writing what you have, I just think these two simple functions would make things easier for anyone writing their own custom bridges/login forms/or adapting a form that already exists.