Hi
I'm new, please go easy on me.
I've been looking through the modules for Drupal 6.x and I can't quite match what I'm looking for, what i want to be able to do is have a user role that can access personal contact forms (if the user has allowed them)
e.g. anonymous can't see the personal contact form
authenticated user can't see the personal contact form
gold_authenticated user *can* see the personal contact form *if* the user has allowed it
any ideas?
TIA
Tony Crockford wrote:
Hi
I'm new, please go easy on me.
I've been looking through the modules for Drupal 6.x and I can't quite match what I'm looking for, what i want to be able to do is have a user role that can access personal contact forms (if the user has allowed them)
e.g. anonymous can't see the personal contact form
authenticated user can't see the personal contact form
gold_authenticated user *can* see the personal contact form *if* the user has allowed it
any ideas?
Not sure if there's an existing module, but one idea for writing a simple one:
By using hook_menu_alter [1] you could re-define the access function:
function mymodule_menu_alter(&$callbacks) { $callbacks['user/%user/contact']['access callback'] = 'mymodule_contact_access_function_name'; }
then you could define:
function mymodule_contact_access_function($account) {
...implement whatever logic you want...
}
You can see how contact defines access by default here [2].
1. http://api.drupal.org/api/function/hook_menu_alter/6 2. http://api.drupal.org/api/function/_contact_user_tab_access/6
Cheers,
Jonathan
Hi,
I have a requirement to include more information in the notification email that is sent to the site administrator when a user registers on the site (users can register, but admin approval is required to activate the account). The additional information required is the new user's email address. The only way I can think of satisfying this requirement is to change the User module in core (5.10).
I could simply change this one line in user.module: drupal_mail('user-register-approval-admin', $from, $subject, t("!username has applied for an account.\n\n!edit_uri", $variables), $from);
To this: drupal_mail('user-register-approval-admin', $from, $subject, t("!username (!mailto) has applied for an account.\n\n!edit_uri", $variables), $from);
But I am not really happy about changing core, especially after reading the first article on Planet Drupal at the moment (http://robloach.net/node/128) which says that the first rule of Drupal is to 'do not hack core'. I can see changes becoming very hard to track, especially when it comes to upgrade time.
So can someone suggest to me another way to acheive a solution to changing the content in this email?
Thanks robin
****************************************************************************************************************************************************************
The content of this email (and any attachment) is confidential. It may also be legally privileged or otherwise protected from disclosure.
This email should not be used by anyone who is not an original intended recipient, nor may it be copied or disclosed to anyone who is not an original intended recipient.
If you have received this email by mistake please notify us by emailing the sender, and then delete the email and any copies from your system.
Liability cannot be accepted for statements made which are clearly the senders own and not made on behalf of Network Rail.
Network Rail Infrastructure Limited registered in England and Wales No. 2904587, registered office Kings Place, 90 York Way London N1 9AG
****************************************************************************************************************************************************************
This should do the trick... (assuming you're using Drupal 6):
http://api.drupal.org/api/function/hook_mail_alter
You'll have to create a little custom module, those docs are http://drupal.org/node/231276
Cheers,
blake hall
On Tue, Oct 21, 2008 at 9:06 AM, Clarke Robin < Robin.Clarke@networkrail.co.uk> wrote:
Hi,
I have a requirement to include more information in the notification email that is sent to the site administrator when a user registers on the site (users can register, but admin approval is required to activate the account). The additional information required is the new user's email address. The only way I can think of satisfying this requirement is to change the User module in core (5.10).
I could simply change this one line in user.module: drupal_mail('user-register-approval-admin', $from, $subject, t("!username has applied for an account.\n\n!edit_uri", $variables), $from);
To this: drupal_mail('user-register-approval-admin', $from, $subject, t("!username (!mailto) has applied for an account.\n\n!edit_uri", $variables), $from);
But I am not really happy about changing core, especially after reading the first article on Planet Drupal at the moment (http://robloach.net/node/128) which says that the first rule of Drupal is to 'do not hack core'. I can see changes becoming very hard to track, especially when it comes to upgrade time.
So can someone suggest to me another way to acheive a solution to changing the content in this email?
Thanks robin
The content of this email (and any attachment) is confidential. It may also be legally privileged or otherwise protected from disclosure.
This email should not be used by anyone who is not an original intended recipient, nor may it be copied or disclosed to anyone who is not an original intended recipient.
If you have received this email by mistake please notify us by emailing the sender, and then delete the email and any copies from your system.
Liability cannot be accepted for statements made which are clearly the senders own and not made on behalf of Network Rail.
Network Rail Infrastructure Limited registered in England and Wales No. 2904587, registered office Kings Place, 90 York Way London N1 9AG
-- [ Drupal support list | http://lists.drupal.org/ ]
On Tue, Oct 21, 2008 at 3:06 PM, Clarke Robin Robin.Clarke@networkrail.co.uk wrote:
I have a requirement to include more information in the notification email that is sent to the site administrator when a user registers on the site (users can register, but admin approval is required to activate the account). The additional information required is the new user's email address. The only way I can think of satisfying this requirement is to change the User module in core (5.10).
You could use the String Overrides module[1] (also written by Rob Loach :) to override any string in Drupal that is wrapped in the t() function. It gives a much simpler way of managing string changes than actually having to change any code.
[1] http://drupal.org/project/stringoverrides
Cheers, Dan
I could simply change this one line in user.module: drupal_mail('user-register-approval-admin', $from, $subject, t("!username has applied for an account.\n\n!edit_uri", $variables), $from);
To this: drupal_mail('user-register-approval-admin', $from, $subject, t("!username (!mailto) has applied for an account.\n\n!edit_uri", $variables), $from);
But I am not really happy about changing core, especially after reading the first article on Planet Drupal at the moment (http://robloach.net/node/128) which says that the first rule of Drupal is to 'do not hack core'. I can see changes becoming very hard to track, especially when it comes to upgrade time.
So can someone suggest to me another way to acheive a solution to changing the content in this email?
Thanks robin
Quoting Clarke Robin Robin.Clarke@networkrail.co.uk:
So can someone suggest to me another way to acheive a solution to changing the content in this email?
http://drupal.org/project/mail_edit
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
My memory is fuzzy, here, but have a look at privatemsg
Tony Crockford wrote:
Hi
I'm new, please go easy on me.
I've been looking through the modules for Drupal 6.x and I can't quite match what I'm looking for, what i want to be able to do is have a user role that can access personal contact forms (if the user has allowed them)
e.g. anonymous can't see the personal contact form
authenticated user can't see the personal contact form
gold_authenticated user *can* see the personal contact form *if* the user has allowed it
any ideas?
TIA