I need an email registration system only in my drupal site.

I installed the module email_registration and I created a module like this http://www.grasmash.com/article/using-your-email-address-your-drupal-username to set the username like the own email address.

Now my user has: name: fra@ore.com email: fra@ore.com But if the user changes is email address the username doesn't update. So if fra@ore.com changes his email to fra@ore2.com the username remain the same.

I tried to update the username by the Set a data value of Rules module After updating an existing profile but I dont know how set this action... Can you help me??

You can look at this: https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_save/7

It will run after a user is created and if a user is edited. You can update the data as required.

  • But in this way I have to write a module? It's not possible do it by rules? – Fra Ore Apr 23 '14 at 18:01
  • you can do it in your theme's template.php file. doing it via Rules would be even more complex in my opinion. – jdu Apr 23 '14 at 20:55
  • Can you do an example to understand what I must do?! – Fra Ore Apr 23 '14 at 21:04

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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