Under some permission setups attempting to "Contact the author" when the viewer is the author (i.e., attempting to send a contact to one's self) will fail even 'though it works if the author is not the same as the viewer (it may actually fail all the time, but I know it fails under my restricted account settings). It also normally doesn't really make sense to have a link to contact your own account about your own posting.

I fixed it by changing line 13 in contactlink.module from

if ($account->contact) {

to

if ($account->contact && ($account->uid != $user->uid)) {

FYI, I'm using Drupal 6.1 ... and thanks for this little module, BTW. It's appreciated.

Comments

mikey_p’s picture

Status: Active » Fixed

Thanks for the tip, I've committed the suggested change to 6.x and 5.x branches. You should see it in the -dev release shortly. I am planning to roll an actual 1.0 release shortly incorporating this change.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.