Email as UserName

Posted by Community Admin on 03-Aug-2018 21:26

Email as UserName

All Replies

Posted by Community Admin on 14-May-2012 00:00

Hi there, 

How can I register users with the email as username?, so they can login with email and password.

Regards.

Posted by Community Admin on 15-May-2012 00:00

Hello,

Please take a look at this forum for solution and let me know if you have more questions.

Regards,
Veronica Milcheva
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-May-2012 00:00

Hi Veronica,

Thanks for the answer, I found this file: www.sitefinity.com/.../179057_createuserwizard.zip,
and I try to add this control, but it´s missing an assembly reference "using Telerik.Security;", I´m on Sitefinity 5

Regards.

Posted by Community Admin on 19-May-2012 00:00

Hi,
 To register a user with its e-mail as username use this API for Sitefinity 5.

var userManager = UserManager.GetManager("Default");
 
System.Web.Security.MembershipCreateStatus status;
 
userManager.Provider.SuppressSecurityChecks = true;
 
var user = userManager.CreateUser("user1@test.com", "user1234@", "user1@test.com", "Question", "Answer", true, null, out status);
 
user.FirstName = "FirstName";
 
user.LastName = "LastName";
 
userManager.SaveChanges();
 
  
 
RoleManager roleManager = RoleManager.GetManager("AppRoles");
 
roleManager.Provider.SuppressSecurityChecks = true;
 
var role = roleManager.GetRole("Administrators");
 
roleManager.AddUserToRole(user, role);
 
roleManager.SaveChanges();
You can find more information for users API in the documentation.

All the best,
Stanislav Velikov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 21-May-2012 00:00

Hi, Stanislav Velikov 

Thanks it works fine, I made my custom control, by the way is there some kind of repository to share custom widgets? 

Best Regards.

Posted by Community Admin on 24-May-2012 00:00

Hello,

You can share them in Sitefinity marketplace .

Kind regards,
Stanislav Velikov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed