|
|
|
Re: Help Needed - fud_user_reg class [message #165045 is a reply to message #165044] |
Tue, 19 April 2011 16:19 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to next message](/forum/theme/default/images/down.png) |
![](//www.gravatar.com/avatar/6dbdad904867cda6f67f452860d212a4?s=64&d=mm&r=g) |
Dayo
![Bahrain Bahrain](/forum/images/flags/bh.png) 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
|
|
|
|
|