Hi Guys in Member.cs in umb 4.7 there is a bug in the MakeNew method line: 217 on
var loginName = (!String.IsNullOrEmpty(LoginName)) ? LoginName : Name;
// Test for e-mail
if (Email != "" && Member.GetMemberFromEmail(Email) != null)
throw new Exception(String.Format("Duplicate Email! A member with the e-mail {0} already exists", Email));
else if (Member.GetMemberFromLoginName(LoginName) != null)
throw new Exception(String.Format("Duplicate User name! A member with the user name {0} already exists", Name));
if LoginName is null or empty it populates the var loginName using name.. the product in then down on line 221.. when checking Member.GetMemberFromLoginName(LoginName) != null it's not using the loginName var it's using the upper.. and hence blowing up if LoginName is empty and throwing the duplicate user name exception..
Umb 4.7 BUG Member.cs
Hi Guys in Member.cs in umb 4.7 there is a bug in the MakeNew method line: 217 on
if LoginName is null or empty it populates the var loginName using name.. the product in then down on line 221.. when checking Member.GetMemberFromLoginName(LoginName) != null it's not using the loginName var it's using the upper.. and hence blowing up if LoginName is empty and throwing the duplicate user name exception..
Hi Tom
Good to see you're reporting a bug :)
Please add it to the issue tracker on codeplex if it has not already been added - then the core team will have the option to take the proper actions.
/Jan
Thanks for all your replies to my questions.. I've responded to the other 4.7 quesiton about membership.. thank you Jan most appreciated
I think this bug is already reported:
http://umbraco.codeplex.com/workitem/29885
And if I recall right the MakeNew method is obsolete.
U should use System.Web.Security.Membership.CreateUser.
But this bug should really be fixed as setting member properties is not that easy as MakeNew with the Membership method.
Edit: Realized not the same issue. Please disregard!
Hi Froad.. but how would i achieve something like this scenario using CreateUser? what would need to change:
is working on a reply...