November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Please share the stack trace, it helps pinpoint generic error messages such as this one.
If you debug that and look at all your textbox values are they filled?
Or what do the properties on newUser look like before calling AddUser?
Environment:
Issue:
Parameter name: value"
This happens when I try to add user or try geta guid.
----------------------------------------------------------------------------------------------------------------------------
IUser newUser = CommunitySystem.CurrentContext.DefaultSecurity.GetUserByUserName(EmailBox.Text.Trim(',')) as IUser;
if (newUser == null)
{
DatabaseHandler.Instance.RunInTransaction(delegate
{
newUser = (IUser)CommunitySystem.CurrentContext.DefaultSecurity.NewUser;
newUser.UserName = UserNameBox.Text.Trim(',');
newUser.EMail = EmailBox.Text.Trim(',');
newUser.Password = PasswordBox.Text.Trim(',');
newUser.GivenName = FirstNameBox.Text.Trim(',');
newUser.SurName = LastNameBox.Text.Trim(',');
newUser.Alias = String.Format("{0} {1}", newUser.GivenName, newUser.SurName);
newUser.Culture = System.Globalization.CultureInfo.CurrentUICulture;
newUser.BirthDate = new DateTime(2008, 3, 9, 16, 5, 7, 123);
activationGuid = (Guid)CommunitySystem.CurrentContext.DefaultSecurity.AddUserToActivate(newUser); // Error!******
//newUser = (IUser)CommunitySystem.CurrentContext.DefaultSecurity.AddUser(newUser); // Error!*******
});
}