|
|
|
Re: Help Needed - fud_user_reg class [message #165045 is a reply to message #165044] |
Tue, 19 April 2011 16:19 |
|
Dayo
Messages: 101 Registered: April 2011
Karma: 0
|
Senior Member |
|
|
OK. Got over that one but although not crashing, no log in either.
Here's the code
// get $fudforum_id. Confirmed to be valid
$cur_ses_id = get_cur_ses_id($fudforum_id);
user_login($fudforum_id, $cur_ses_id, true);
function get_cur_ses_id($id) {
$fudSesId = $_COOKIE[$GLOBALS['COOKIE_NAME']] or 0;
if (empty($fudSesId)) {
$s = db_saq('SELECT ses_id, sys_id FROM '. $GLOBALS['DBHOST_TBL_PREFIX'] .'ses WHERE user_id = ' . $id);
if (!empty($s)) {
$fudSesId = $s[0];
} else {
$fudSesId = 0;
}
}
return $fudSesId;
}
Any ideas?
Cheers.
[Updated on: Tue, 19 April 2011 16:20] Report message to a moderator
|
|
|
|
|