phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Reactivation key not working for some users


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
RefugeeBob
Board Member



Joined: 13 Mar 2011

Posts: 31



PostPosted: Fri May 10, 2013 11:37 pm 
Post subject: Reactivation key not working for some users

Sometimes, when a user changes his e-mail address in his profile, the link in the "Reactivate your account" e-mail does not work. They will contact me and quote the e-mail in the process, including the link, and I'll click on it and it will work every time. I have signed up test users, changed their e-mail addresses, received the reactivation e-mails and the link works every time. I have unable to reproduce the problem.

These users are taken to the log-in screen instead of getting the message saying their account has been reactivated. Their accounts remain deactivated.

I don't know how many users have this problem, as I don't hear from any who don't have it.

It's puzzling why the link won't work on the user's end but will always work for me. There is nothing wrong with the link itself. It is being generated correctly.

Has anyone else encountered this? Any ideas?

Thanks.

...Bob
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Sat May 11, 2013 5:35 am 
Post subject: Re: Reactivation key not working for some users

This sounds to me like a problem caused by their email client.

Are these hotmail accounts?

_________________
phpBB2 will never die, I hope!
Back to top
RefugeeBob
Board Member



Joined: 13 Mar 2011

Posts: 31



PostPosted: Sat May 11, 2013 5:42 am 
Post subject: Re: Reactivation key not working for some users

dogs and things wrote:
This sounds to me like a problem caused by their email client.

Are these hotmail accounts?


No.

Eliminated: browser issues, Mac/PC and e-mail service. All different combinations report this problem.

Thanks.

...Bob
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 425
Location: Québec


flag
PostPosted: Sat May 11, 2013 3:54 pm 
Post subject: Re: Reactivation key not working for some users

I don't think I've ever dealt with this feature before, what does the link look like?
Back to top
RefugeeBob
Board Member



Joined: 13 Mar 2011

Posts: 31



PostPosted: Sat May 11, 2013 5:52 pm 
Post subject: Re: Reactivation key not working for some users

Salvatos wrote:
I don't think I've ever dealt with this feature before, what does the link look like?


When a user changes his e-mail address in his profile, his account is deactivated. The user is automatically sent an e-mailn with the subject "Reactivate your account" which includes the link that's used to reactivate the user's account. The e-mail looks like this:

Quote:
Hello testuser,

Your account on "Your Forum" has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below:

http://www.yourforum.com/profile.php?mode=activate&u=3441&act_key=b909da55

-- Thanks, Forum Management


The user is sent this e-mail only if the forum is set to user activation. I have this mod installed:

http://www.phpbbhacks.com/forums/differentiate-between-new-accounts-and-changed-accounts-vt79536.html

Thanks.
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 425
Location: Québec


flag
PostPosted: Sat May 11, 2013 8:05 pm 
Post subject: Re: Reactivation key not working for some users

Oh, well your mod is incomplete. includes/usercp_activate.php does not account for that possibility. It's either admin activation or user activation, not both depending on the case. Line 50 is why it fails, and it's normal behavior.

Code:
      }if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $row['user_newpasswd'] == '')
      {
         if (!$userdata['session_logged_in'])
         {
            redirect(append_sid('login.' . $phpEx . '?redirect=profile.' . $phpEx . '&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($HTTP_GET_VARS['act_key'])));
         }
         else if ($userdata['user_level'] != ADMIN)
         {
            message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
         }
      }

In its current state, all your mod really does is send the reactivation link to the user rather than the admin, while only the admin can use it.

For your mod to work, you'd have to differentiate between activation and reactivation. I'm not sure there's an easy way to do that without creating a database entry -- if you just add a parameter to the reactivation URL, it could be faked by anyone wanting to self-activate their new account rather than let it go to the admin (of course they'd have to know you made this modification, but still). If you want to do that, I think it would be as simple as adding this before the last closing bracket above:
Code:
         else if ($HTTP_GET_VARS['reactivation'] == "1")
         {
            // Self reactivation, proceed
         }

And of course modifying the link that gets sent in the e-mail, adding reactivation=1 at the end.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0268 seconds using 15 queries. (SQL 0.0021 Parse 0.0008 Other 0.0239)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo