The users are not created

Jul 2, 2009 at 2:32 PM

Hello,

we are trying to build a POC of your solution and we found something is not working as expected. We fill out all the forms, select the site template and everything, then we receive the email, and we go to activate the account. The application starts creating the site and, in step 2/3 we get the error: user not found. The site is created and we can navigate to it but just unauthenticated. After a quick review of the code we found that:

        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            //try
            //{
            //    Utils.Log("CreateUser");
            //    try
            //    {
            //        if (new User(username, SPDataSource).isPopulated)
            //        {
            //            status = MembershipCreateStatus.DuplicateUserName;
            //            return null;
            //        }
            //    }
            //    catch
            //    {
            //        Utils.Log("Could not validate user name -> " + username);
            //    }
            //    MembershipUser newUser = new MembershipUser(this.GetType().ToString(), username, username, username, null,
            //        null, true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);

            //    User user = new User(-1, username, password);
            //    user.UseSPDataStore = SPDataSource;
            //    user.Save();

            //    status = MembershipCreateStatus.Success;
            //    return newUser;
            //}
            //catch (Exception ex)
            //{
            //    Utils.Log("Error - " + ex.Message);
            //}
            status = MembershipCreateStatus.ProviderError;
            return null;
            /* validateList();
           
             SPListItem newUser = _userList.Items.Add();
             newUser[m_FieldUser] = username;
             newUser[m_FieldPwd] = password;
             newUser.Update();
             SPWeb rootWeb = SPContext.Current.Site.RootWeb;
           
             SPWeb newSite = rootWeb.Webs.Add(sCompany);
             newSite.Update();*/
        }

Is it correct? is the user being created in another place? Any help would be much appreciated.

David Martos