What rubbish.
Please Log in to join the conversation.
Please Log in to join the conversation.
Feendish wrote:
I think I've solved the problem (on my site anyway). To recap the problem: If the user chose "Remember Me" and logged in then closed their browser and came back at a later time, the user would appear to be logged out. BUT if they refreshed the page they magically are logged in again.
The solution:
1. Make sure mod_cblogin is installed correctly.
2. Make sure mod_login (the one supplied with Joomla is disabled).
3. Insert the following code at the top of your templates index.php file or AFTER the global declarations in the mod_cblogin.php file.
[code:1]<?php
$user =& JFactory::getUser(); //Grab the Joomla 1.5.x user details object
if ((!$my->id)&&($user->id)){ //If the legacy array is not populated but user is still logged in according to Joomla 1.5.x,
foreach ($user as $key => $value) { //loop through 1.5.x user object
$my->$key=$value; //and copy 1.5.x object value to same key in 1.0.x object.
}
}
?>[/code:1]
The issue seems to be that the $my object is not being populated until the page is refreshed. What the code above does is checks that (a) the user is stilled logged in according to the newer 1.5.x $user object and (b) the legacy 1.0.x $my object is empty. It then copies the $user values into the $my values as both objects contain the same keys. Hope this works. I'm sure someone will suggest a cleaner fix.
I was waiting for an "official" or "cleaner" fix from the CB folks here, but I guess they have all their eggs in the 1.2 basket.
As soon as GoDaddy fixes their FTP server, I'll give this a try and report back here. Thanks!
Please Log in to join the conversation.
Please Log in to join the conversation.
Am I to understand that CB 1.2 takes advantage of running native in Joomla! 1.5 even if I keep the legacy plugin turned on for other reasons?
Please Log in to join the conversation.
AFTER the global declarations in the mod_cblogin.php file.
Please Log in to join the conversation.