By stretchwickster on
Hi there,
I have enabled the contact module which allows messages to be sent between users via personal contact forms (e.g. user/2/contact). Currently any logged in user can access the personal contact forms. I'd like to restrict access to the personal contact forms so that only subscribed users (a user role I have created) can use this facility and all other user roles see a "Subscribe to my site" message. I've tried using various modules (such as the Premium module) but they don't seem able to restrict access to the personal contact forms.
Are there some code changes I can implement in order to achieve this?
Your help would be much appreciated.
Comments
Well it turns out that
Well it turns out that contact.module doesn't have a _perm hook. If you add that and then add an if statement that checks for the permission around the code that prints the message, that should do you.