News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

ssi_login stopped redirecting

Started by wakewatcher, May 04, 2012, 03:08:53 AM

Previous topic - Next topic

wakewatcher

Sometime after installing 2.0.2 my integration got flaky and gets into modes when it stops redirecting to my application but instead redirects to the forum landing page.  (If I then type in my application landing page its happy and knows its logged in but often won't get there on its own.  I've seen other topics here which shows how to use ssi_login and that is what I have been doing.  E.g.


$LogoutURL = "http://www.msn.com";
$Referrer = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$_SESSION['login_url'] = $Referrer;
$_SESSION['logout_url'] = $LogoutURL;

if ($context['user']['is_guest'])
   ssi_login();



I've also tried ssi_login($Referrer) wondering if the Session variables were getting cleared or something but that didn't help either.  Just seems odd.  Sometimes it works and sometimes it doesn't and I can't seem to repro it.  I've fooled around with making my own redirect but figured decided that was a bad idea.  The other thing that is odd (or maybe not) is that  when it redirects the login to the forum (and then I hyperlink to my application) and then logout from my application it also redirects the logout to the forum. (instead of msn.com in this example.)
I'm stumped.

UPDATE: I rewrote it to use Andre's smf_2_api and it works great. (Or at least so far.)
smf 2.0.18

Advertisement: