Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

A Drupal 6 membership-based site has some rules in place to block registrants based on certain field values (that spammers are using).

When this happens, it triggers the system to send an email to the site admin, as though "Visitors can create accounts but administrator approval is required" is checked, although it's not. While this is a bug, it's not the problem here.

The problem is with the URLs in the email. Sometimes, the link is written correctly, as in:

florenefl has applied for an account.
http://www.sitename.com/user/8872/edit

and sometimes the http:// is followed by only 2 "ww"s:

fdstyd52as has applied for an account.
http://ww.sitename.com/user/8880/edit

This second link doesn't work for the site admin. It appears to occur randomly. Any ideas why this would happen?

EDIT: the email is sent from user.module line 1720

case 'register_pending_approval_admin_body': return t("!username has applied for an account.\n\n!edit_uri", $variables, $langcode);

Using the Maillog module, I checked the Welcome emails sent to regular users which also uses !edit_uri. I don't see any with the truncated "www".

I also modified the rule to email me when a registrant is blocked, and to include the token for user/*/edit. That URL is also faulty in the emails ... corresponding to when the system emails are faulty. So whenever an account gets blocked, and the email is triggered (whether through the system or through Rules), it appears to randomly truncate the www.

share|improve this question
Do you have a .htaccess with a RewriteBase? – yunzen May 15 at 11:06
^ what he says, and are settings in admin/config/system/site-information OK? – Mołot May 15 at 11:11
RewriteBase is commented out in htaccess. Under Site Info, the Name is listed as www.sitename.com (with the www) - but that's not used to build the URL in the link anyway, is it? – keva May 15 at 12:52

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.