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

Home » FUDforum Development » Bug Reports » Email confirmation page
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Email confirmation page [message #18182] Wed, 12 May 2004 21:31 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
I've come across a case where clicking on the email confirmation link won't automatically log the user into the forum.

If the user either has cookies turned off, or if they quit their browser before clicking on the link, then there is no cookie containing a previous session ID.

Note this code in emailconf.php:

		if ($usr->users_opt & 2097152) {
                       header('Location: {FULL_ROOT}{ROOT}' . ($FUD_OPT_2 & 32768 ? '/rc/' : '?t=reg_conf&') . _rsidl);
			return;
		} else if (!__fud_real_user__) {
			$usr->ses_id = user_login($uid, $usr->ses_id, true);
		}
		check_return($usr->returnto);


At the point this code runs, $usr contains the Guest account, not the user's real account data. So users_opt reflects the wrong user, and the rest of the code acts incorrectly. reg_conf.php also acts incorrectly, if it gets called.

I think that $usr needs to be reset, based on the $uid variable, before anything is done with users_opt. The correct uid also needs to be put into the session data.
Re: Email confirmation page [message #18184 is a reply to message #18182] Wed, 12 May 2004 21:56 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed, here is the patch:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=2748


FUDforum Core Developer
Re: Email confirmation page [message #18212 is a reply to message #18182] Thu, 13 May 2004 15:17 Go to previous message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
This works perfectly, thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wrong Subject: format and ERR_systemerr
Next Topic: Post edition in anonymous mode
Goto Forum:
  

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

Current Time: Tue Dec 03 18:38:13 GMT 2024

Total time taken to generate the page: 0.02126 seconds