Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
As I just said, I have a problem with Membership.CreateUser and Umbraco
I have a function that creates a user. The user gets created as supposed in the members section, but for some reason I cannot login.
If I go to the Umbraco backend and save the member, without changing anything, I can now log in with that member. Anybody got any idea on what to do?
CreateUser _newMember = Membership.CreateUser(username, clearPass, email);Roles.AddUserToRole(_newMember.UserName, "ForumUser");_newMember.IsApproved = true;Membership.UpdateUser(_newMember);var document = new Member((int) _newMember.ProviderUserKey);document.getProperty("forumUserPosts").Value = 0;document.getProperty("forumUserLastPrivateMessage").Value = document.CreateDateTime;document.getProperty("forumUserIsAuthorised").Value = true;document.XmlGenerate(new XmlDocument());document.Save();
Turned out that I forgot to set a true/false property to 0, which gave me an empty value.
And in my code in another place this gave an exception, which logged of the user again.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with createuser
As I just said, I have a problem with Membership.CreateUser and Umbraco
I have a function that creates a user. The user gets created as supposed in the members section, but for some reason I cannot login.
If I go to the Umbraco backend and save the member, without changing anything, I can now log in with that member. Anybody got any idea on what to do?
CreateUser
_newMember = Membership.CreateUser(username, clearPass, email);
Roles.AddUserToRole(_newMember.UserName, "ForumUser");
_newMember.IsApproved = true;
Membership.UpdateUser(_newMember);
var document = new Member((int) _newMember.ProviderUserKey);
document.getProperty("forumUserPosts").Value = 0;
document.getProperty("forumUserLastPrivateMessage").Value = document.CreateDateTime;
document.getProperty("forumUserIsAuthorised").Value = true;
document.XmlGenerate(new XmlDocument());
document.Save();
Turned out that I forgot to set a true/false property to 0, which gave me an empty value.
And in my code in another place this gave an exception, which logged of the user again.
is working on a reply...