The problem does NOT lie in the login module from what I have determined. It lies in the Mambo index.php patch. I had had previously patched it manually because the patch was designed for the Joomla index.php. The only downside to my fix, you'll have to edit the code manually. I could post an entire 4.5.4 index.php file upon request, but I am not attaching one at this time.
In the logout section of the code, the original patched version reads:
Code:
else if ($option == "logout") {
//JOOMLAHACKS.COM
//$mainframe->logout();
mosRedirect( 'index.php?option=com_smf&action=logout;sesc='.$context['session_id'] );
...
//JOOMLAHACKS.COM
//$mainframe->logout();
mosRedirect( 'index.php?option=com_smf&action=logout;sesc='.$context['session_id'] );
...
Removing or commenting the mosRedirect statement fixed the redirect issue, but caused even more errors that I wasn't about to deal with, so I changed it back. I then uncommented the mainframe logout and found the doSMFlogout() function in functions.smf.php in the administrator component. Calling this funciton simply logs the user out of the SMF database. To log the user out of the fronted Mambo/Joomla uncomment the mainframe logout. At this point, the redirect is not needed to log the user out of SMF, so it can be removed. The fixed code:
Code:
else if ($option == "logout") {
//JOOMLAHACKS.COM
doSMFLogout();
$mainframe->logout();
...
//JOOMLAHACKS.COM
doSMFLogout();
$mainframe->logout();
...
The fixed code logs the user out of both sources, and by default redirects to index.php, the Mambo/Joomla frontpage.
I am still trying to correct the login issue. If I find a solution there I will post it here as well.
EDIT: I tried using the integrateLogin method from the bridge's functions, but I think there is something wrong with the SMF login portion of this method. The redirect was avoided with this method and the user logged into the site, but when I tried to access the forum, the login didn't transfer. I used this code to test:
Code:
if ($option == "login") {
//JOOMLAHACKS.COM
//$mainframe->login();
integrateLogin(_username, _password, -1);
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
$_SESSION['_FROM_MOS'] = true;
//doMamboSMF(true);
//JOOMLAHACKS.COM
//$mainframe->login();
integrateLogin(_username, _password, -1);
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
$_SESSION['_FROM_MOS'] = true;
//doMamboSMF(true);
Forum 







