I am trying to allow users to contact each other through my website. However, every time a user goes to another user's personal contact page at "user/5/contact" where 5 is the User ID, there is an Access Denied message that tells me "Your are not authorized to view this page."

I can't seem to figure out where to change the settings to allow users access to this page for other users.

Any help would be greatly appreciated.
Thank you in advance.

Comments

nevets’s picture

Is the Contact module enabled?

Have you granted the "Use users' personal contact forms" permission to appropriate roles?

andreavr’s picture

I've been trying to work this out too. I don't think the "personal contact forms" are to use as we want.

I do have the "use users" permissions set for the authenticated roles.

I thought the same as you - if you allow people to contact via the personal contact form this should allow other authenticated users to contact you. But through testing different roles I have setup - it appears you have to have "Administer Users" permissions before you can see other users/ or you own contact form.....doesn't make a lot of sense to me as this means you're pretty much an admin (so why the "Allow other users to contact you via a personal contact form which keeps your e-mail address hidden. Note that some privileged users such as site administrators are still able to contact you even if you choose to disable this feature.")....

There are ongoing issues with this area: http://drupal.org/node/345541 explains why you can't see your own contact form (to prevent spamming from within the site).

nevets’s picture

The only permission you need is 'access user contact forms', but the user has to have enabled their contact form for it to be visible.

On should not generally grant "Administer Users" to other than trusted users, and it's not needed to see the contact form.

Milkbones07’s picture

I think I figured this out. I think the problem was that I didn't have the contact form entered on my account. That's why nobody else could contact me. So, it seems to work properly, but is dependent upon each user activating the contact form for his or her account.

andreavr’s picture

Have found out my problem too and is now working.

NOTE: make sure the administrator role has the Personal Contact Form checked/ticked as is appears to affect the other users.

I had enabled the contact module after the admin profile was formed and all users afterwards had their personal contact form enabled, logging in as admin you could see all other users' personal forms (even without the admin's own personal form checked...), probably because the admin has "administer users" permissions. However if you logged in as another user you couldn't see any other users personal forms - wasn't until I went through them all again did I notice administrators' personal form hadn't been ticked/checked under "my account" -> edit -> contact settings.

drupalreggie’s picture

Currently using Drupal 7.x

Permissions for custom role & authenticated user:
Use the site-wide contact form YES
Use users' personal contact forms YES

All users and admin account pages personal contact form check box set to: YES

User's of custom role cannot view their own contact form pages, but they can view the contact form pages of other users. Not a major problem but the link supplied to user's own contact forms on their edit account page is confusing.