Login With Email Id after creating custom registration form.

Nikhil Vasdev asked on June 24, 2014 03:32

Hello Team,

I am working with Kentico Login but I am getting an issue that when I try to login with email id instead of user name. I had created custom registration(as I need added some extra required fields from my side). In case I tried it with default registration it is able to login with email id. So can you please help me to solve the issue of login with email (by adding custom registration form).

Recent Answers


jack Ryder answered on June 24, 2014 04:11

Hello, First of all if you are going with custom regi. form then by default kentico insert email id as a user name..if you are using kentico 8.and also if you have custom fields then use custom data field so u can use kentico bydefault functionality

0 votesVote for this answer Mark as a Correct answer

Nikhil Vasdev answered on June 24, 2014 04:39

Hello Jack,

Yes, I am using Kentico 8 and added some custom fields and remove user name field from table. It is not inserting email as user name rather it will insert user name filed as user, user_1, user_2 etc but when I remove the custom fields and then use register(which is by default) then it uses email as user name.

I want to add custom fields in my table and this doesn't work. So can you please help by providing some way which helps me to solve the issue. Thanks.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on July 25, 2014 10:26

Hi,

The default "Registration form" web part has this hard coded - it takes the e-mail value and adds it as the user name:

 String plainUserName = txtEmail.Text.Trim();
            ui.UserName = plainUserName;

So, you need to either modify the custom registration form web part and add this logic or, if you want to enable the users to login under both user name and email, please follow this approach.

Best regards,
Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.