1

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: [email protected] email: [email protected] But if the user changes is email address the username doesn't update. So if [email protected] changes his email to [email protected] 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??

1 Answer 1

0

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.

3
  • But in this way I have to write a module? It's not possible do it by rules?
    – Fra Ore
    Commented Apr 23, 2014 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
    Commented Apr 23, 2014 at 20:55
  • Can you do an example to understand what I must do?!
    – Fra Ore
    Commented Apr 23, 2014 at 21:04

Your Answer

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

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