Hello to you all!
The problem I'm trying to solve is the following:
On the registration page, I want to restrict the domain of the e-mail adress only between a few choices (to limit the use of the site to internal company use only) through a list of choices.
The user, upon registration, would therefore only have to write the characters before the at sign.
The final value of the email registered by drupal (and thus registrered in the database) should be like this one:
[User_entry ]+[@]+[chosen_domain_name]
I guess I should modify the template page-user-register.tpl.php and put it in my theme folder. But I do not know how to return the correct variable for saving the good e-mail ... : (
I found some functions to verify the e-mail spelling (e.g.: http://drupal.org/node/755894), but I really want users only to have the choice between shown domain names.
-> For instance:
Let's say I limit to e-mail like xxx@dede.fr and xxx@dede.net.
Upon registration, the user does not see a classic e-mail field (text field with detection of structure), but rather:
[Short input text field] @ [choice between> dede.fr> dede.net]
If his address is pierre@dede.fr, he types pierre and chose dede.fr.
If his address is pierre@yahoo.fr, he may not register on the site.