Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In contact.module, there is the following code:
// Users may not contact themselves.
if ($user->uid == $account->uid) {
return FALSE;
}
which seems sensible enough, but, further down the code under function contact_user there is this entry for a user's personal contact form:
'#description' => t('Allow other users to contact you by e-mail via <a href="@url">your personal contact form</a>. ...snip....', array('@url' => url("user/$user->uid/contact"))),
which then creates a perma-dead link since the user/@user->uid/contact can't resolve for the current user.
Am I missing something (quite possible...) or, how can this be fixed?
Thanks
Steve
Comments
Comment #1
steveray CreditAttribution: steveray commentedSorry, title was incorrect.
Comment #2
Dave ReidDuplicate of #345541: Link to contact form in user account and e-mails leads to 403.