More in this section

Forums / General Discussions / CreateUser method

CreateUser method

2 posts, 0 answered
  1. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    23 Jan 2011
    Link to this post

    Hi

    I am using the CreateUser method as below;

    UserManager manager = UserManager.GetManager("Default");
      
            public void test()
            {
                manager.Provider.SuppressSecurityChecks = true;
      
                string username = "abc";
                string password = "1234567";
                string email = "abc@defgh.com";
                string passwordQuestion = null;
                string passwordAnswer = null;
                bool isApproved = false;
                object providerUserKey = null;
                MembershipCreateStatus status = default(MembershipCreateStatus);
                User newuser;
      
                newuser = manager.CreateUser(username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey, status);
      
            }

    Problem is I'm getting the below error on the CreateUer method above;

    The best overloaded method match for 'Telerik.Sitefinity.Security.UserManager.CreateUser(string, string, string, string, string, bool, object, out System.Web.Security.MembershipCreateStatus)' has some invalid arguments

    What am I missing?

    Many Thanks

    Regards

  2. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    23 Jan 2011
    Link to this post
    Sorry, I just checked, last parameter is an out para. Fixed now. This is what late night working does to you.

    Thanks
2 posts, 0 answered