FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Help Needed - fud_user_reg class
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Help Needed - fud_user_reg class [message #165045 is a reply to message #165044] Tue, 19 April 2011 16:19 Go to previous messageGo to previous message
Dayo is currently offline  Dayo   Bahrain
Messages: 101
Registered: April 2011
Karma:
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

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fudla! Plugin Core Code Changes
Next Topic: Function to send emails?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 18:32:06 GMT 2024

Total time taken to generate the page: 0.05120 seconds