Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
A few users recently complained that they could not update their own email address. Here is what happens:

1 - User logins to their account and updates their profile / email address.
2 - They receive an email titled "Email Verification for OurDomain.com Discussion and Help Forums".
3 - User clicks on the link in the email and gets the message "We could find no pending email verification for your account. "

I have verified that they indeed have attempted to update their email address. When I log in as the user, under Edit Profile there is a message in red that says "Your request to change your email to 'new@email.address' is still unverified. Please check your mail for our verification email."

In MySQL, I see that USER_UNVERIFIED_EMAIL in table ubbt_USER_PROFILE has their pending email address.

The user has sent me the email they received and I get the same results.

Have I incorrectly set something in the forum setup, or is this a bug?

Thanks for any suggestions.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I don't have access to the code at this moment, but I will in about an hour or so then I'll take a look at a few things and see what might be going on. Nothing really to configure for this, since they are getting the email it should just work. So it could be a bug.

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
Thanks Rick. I am happy to do any troubleshooting you might require from this end also.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Hmm, so I can't find anything directly wrong with the code itself. Tested on a couple forums and working. If you are comfortable with PHP then you can try the following.

Around line 155 of scripts/verifyemail.inc.php is where things take place. Basically it's supposed to grab the uid and the key from the link in the email. It then does a lookup in the database and compares and md5 of a couple fields with the key from the email.

In your case, for some reason that's not matching. So if you know you're way around PHP you can maybe add a bit of code after the query to see if it's finding any results at all.

If you're not really comfortable debugging, then probably best to open up a support ticket so I can debug directly.

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
No sweat on the debugging. Will take a look in a bit and get back to you. Thanks.

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
First results show:

Array ( [verify] => -72af24f1e92d7er456435635435342211b0e [em] => 1 )

For some reason it is not finding the uid of the user. Is that normal? (I changed the above hash). So the dash is there and there list($uid,$key) is run, but $uid is then empty, and the SQL query would fail.

Would you have an idea about finding out how UID is empty?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Hmm, can you give an example of what the link from the verification email looks like? It looks like it's possibly missing the uid portion that is supposed to be coming before the -

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
Ah, correct. It is missing it:

http://www.domain.com/forums/ubbthr...4f1e92d7er456435635435342211b0e&em=1

So I need to look at the code that creates this link.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
That's odd. That link is generated on line 705 of scripts/changebasic.inc.php

You'll see where it has &verify={$user['USER_ID']}

If $user['USER_ID'] is empty then the rest of the script should actually be failing as well.

Is this just happening for some users?

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
In scripts/changebasic.inc.php $user['USER_ID'] exists before Line 684 - rebuild_islands("birthdays"); but is empty after it.

The user, me in this case, has not set their birthday (all drop downs are blank) and 'show birthday in profile' is not checked.

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
Just verified that after Line 684 - rebuild_islands("birthdays"); the entire $user is non existant.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, let me take a look.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, this was one thing I had fixed for 7.5.4 for a different reason but I can see how it can cause an issue that you're having as well. Especially if you're using any custom islands.

That rebuild_islands("birthdays"); call needs to be moved down towards the bottom of the file. About line 708 right before this comment:

// Send them to their start page with confirmation.

Joined: Oct 2007
Posts: 14
P
stranger
stranger
P Offline
Joined: Oct 2007
Posts: 14
Ah, that makes sense. Though rebuild islands should n't really touch $user should it? Regardless, I moved it and all works fine now. Thanks!

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Correct, rebuild_islands shouldn't. But in 7.5.3, the online_now cache_builder has $user declared as a global and that's run when rebuild_islands is called. 7.5.4 is fixing that, since it really never should have been there in the first place.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)