Welcome Guest, Not a member yet? Register   Sign In
Joomla woes
#9

[eluser]jwindhorst[/eluser]
Maybe it would help if I posted the code I added to the beginning of the getUser function:

Code:
$ci_link=mysql_connect($params_to_ci_db);
mysql_select_db('database_name');

$uip=$_SERVER['REMOTE_ADDR'];
$cross_over_query = "SELECT user_data FROM ci_sessions WHERE ip_address='$uip'";
$cross_over_results = mysql_query($cross_over_query);

while($cross_over_row= mysql_fetch_object($cross_over_results))
{
    $user_data=unserialize($cross_over_row->user_data);
    $user_id=$user_data['cms_id'];  // assume this is our joomla user id.
}
if(is_numeric($user_id))
    $id=$user_id;

// THE NEXT LINE IS
jimport('joomla.user.user); // UNCHANGED AS IS THE REST OF THE FUNCTION

So, essentially I was trying to provide the $id if it was missing, but something that happens earlier in the app is being skipped.


Messages In This Thread
Joomla woes - by El Forum - 06-19-2009, 01:37 PM
Joomla woes - by El Forum - 06-19-2009, 01:57 PM
Joomla woes - by El Forum - 06-19-2009, 02:06 PM
Joomla woes - by El Forum - 06-19-2009, 02:10 PM
Joomla woes - by El Forum - 06-19-2009, 02:11 PM
Joomla woes - by El Forum - 06-19-2009, 02:18 PM
Joomla woes - by El Forum - 06-19-2009, 02:36 PM
Joomla woes - by El Forum - 06-19-2009, 02:55 PM
Joomla woes - by El Forum - 06-19-2009, 03:20 PM
Joomla woes - by El Forum - 06-19-2009, 05:37 PM
Joomla woes - by El Forum - 06-19-2009, 06:17 PM
Joomla woes - by El Forum - 06-22-2009, 08:04 AM
Joomla woes - by El Forum - 06-22-2009, 08:11 AM
Joomla woes - by El Forum - 06-22-2009, 05:06 PM
Joomla woes - by El Forum - 07-29-2011, 01:39 AM
Joomla woes - by El Forum - 07-29-2011, 09:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB