Hi Rafik,
Thank you for your post.
Currently you can use only UserName to log a user in the system using AuthenticationHelper class, however you can get UserName out of the E-mail and then use the UserName for the authentication.
You can try something like this:
// Prepare the parameters
string where = "Email = 'andy@kentico.com'";
// Get the data from database
var users = UserInfoProvider.GetUsers().Where(where);
// Loop through the individual users
foreach (UserInfo user in users)
{
}
Be sure to set system to use unique e-mails when developing your login webpart. You can do so in Settings -> Security & Membership -> Require unique user e-mails
Also be sure that no more then 2 users are found with same e-mail, it might indicate some issues when trying to log in as you might log as someone else.
Let us know if you need anything else.
Kind regards,
Richard Sustek