Hey, this is confusing the heck out of me.
I enabled this module, and turned it on.
An anonymous user then sees a "Contact Author" link for each relevant node type. For instance, it goes to /user/1/contact .
But if the anonymous user clicks on it, they get a "Access denied... You are not authorized to access this page." error.
Shouldn't the anonymous user be able to access that page? Logged in users can. I do have the "access site-wide contact form" permission enabled for anonymous users.
I think you're making the assumption that anonymous users can access personal users' contact forms when they cannot. See here. So at the least the link should only appear for logged in users. But I would prefer to allow anonymous users to enable a user's contact form. As it is, this module is basically not fit to deploy because it displays a nonfunctional link by design. What's the best way around this?
Comments
Comment #1
tunesmith commentedFor now I edited contactlink_link to add a
global $user;
and make the link generation routine say
if ($account-contact && $user->uid) {
Comment #2
nedjoThanks for the fix. I've applied a slightly modified version.
Comment #3
(not verified) commented