0

The issue is for non admins to only view a particular part of the user section. The current password and email address fields need to be hidden. I've tried the field permissions but that doesnt give an option.

Writing the hook makes sense to hide both the fields but the validation is what I'm having issues with. If I add optional mail or the mail control modules, I'm thinking its going to throw a few other things off.

2
  • The issue is for non admins to only view a particular part of the user section. The current password and email address fields need to be hidden. I've tried the field permissions but that doesnt give an option. Writing the hook makes sense to hide both the fields but the validation is what I'm having issues with. If I add optional mail or the mail control modules, I'm thinking its going to throw a few other things off. Mar 4, 2015 at 16:27
  • It seems you've edited this question down to nothing. Care to put something back? Sep 28, 2015 at 14:04

2 Answers 2

1

You need to do a lot more than just unsetting the field if you want to change the way registration works. Out of the box, Drupal expects a valid email unique address for every user. This is why there are contributed modules for this purpose: it needs a fair amount of code to achieve.

Take a look at https://www.drupal.org/project/optional_mail for example.

2
  • i had to remove the question because it had internal code from my company. i apologize. is there a way to completely delete this without getting blocked from using this program? Sep 28, 2015 at 14:08
  • You could rephrase the question without pasting code. That should be OK, no? Sep 28, 2015 at 14:27
0

To disable the user Registration e-mail verification you can use the mailcontrol module.

Have full control over the default mails sent by Drupal 7 out of the box.

Description

This small module extends original Drupal 7 account settings page with the ability to globally turn ON/OFF all standard mails. By default Drupal 7 provides no option to globally disable the following mails:

  • Welcome (new user created by administrator)

  • Welcome (awaiting approval)

  • Welcome (no approval required) Password recovery

Use cases

This module may come in handy when:

  • you don't want to send those emails for some reason

  • or you are sending them through some other means

  • or to get rid of the PHP Mail error message when you’re working on localhost

  • or other development purposes

Also this question have been ask already at - Disable register email notification

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.