SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Problems with the activation links in activation email

Started by ein_stein2000, October 24, 2008, 08:42:46 AM

Previous topic - Next topic



I'm running SMF 2.0 Beta 4 with the following mods:
1. Last Active On MemberList      1.01
2. Hide Info Center From Guests    1.0

A lot of users have problems when clicking on the activation link (for example:;u=59;code=bc2c43e1c3 [nofollow] ) in the email they receive after they have registered an account. When they click on the link, the URL looks like the following URL: [nofollow] ... the special characters are encoded ... after clicking on the link they don't activate the account, they stay on the frontpage of th forum. users often think that they have activated the account although they didn't.

I've investigated and found the following: the URL "changes" when you click in a webmail-client like [nofollow] (have not yet testet hotmail, [nofollow] and others) the link. When using outlook/thunderbird the encoding is correct and you can activate the account.

Any idea how to solve the problem? I've also an idea for a workaround: I would like to edit the text of the activation email, where is the text stored?


Not sure what might cause that on the webmail service. Does it allow you to toggle between allowing you to read HTML emails and plain text? Just a hunch....

The text is stored in /Themes/default/languages/Login.english.php:

$txt['register_activate_message'] = 'You are now registered with an account at ' . $context['forum_name'] . ', %1$s!' . "\n\n" . 'Your account\'s username is %2$s and its password is %3$s (which can be changed later.)' . "\n\n" . 'Before you can login, you first need to activate your account. To do so, please follow this link:' . "\n\n" . '%5$s' . "\n\n" . 'Should you have any problems with activation, please use the code "%4$s".' . "\n\n" . $txt[130];


I've got exactly the same problem. I will see if I can fix it by myself, but it seems to be a bug.

Quote from: greyknight17 on October 24, 2008, 06:58:39 PM
The text is stored in /Themes/default/languages/Login.english.php: ...

That's not true for SMF 2.0 Beta 4. There the text can be found in /Themes/default/languages/EmailTemplates.english.php. Inside this file there is a placeholder called {ACTIVATIONLINK}. I am about to find the script where this placeholder gets replaced.

Edit: Sorry, maybe the problems are the webmailers. When I receive the email via Thunderbird, the link works fine. But maybe the semicolons in the link should be replaced by the ascii-code &#59;. I will try that now.

Edit2: Replacing the semicolons with the ASCII-Code makes it even worse. Well, it's likely the fault of the webmailers. I think the only option we have to make this work is to send HTML-mails instead of plain text.


I think the problem is the ; because for example the activation link for phpBB3 looks like [nofollow] and I had no problems with GMX and other webmail clients.

For a workaround I tried to edit the text of the email with a link to the activation page [nofollow], so I would like to edit the activation text to: 'Should you have any problems with activation, please open the Link [nofollow] and use the code "%4$s".' But the problem is that, as far as I know, the link should include the user-id, so something like that:;u=[ID] [nofollow] ... but I don't know how to get the user-id or the URL with the user-ID and there you have the same problem with the ; ...

Is there another way to activate a user? It would be nice if there would be an activation form with: email, user-id, user-activation-code ... Any idea how to implement such a form? I'm not familiar with PHP :(