New Membership Request

Topics: Internet/Extranet Edition
Jul 8, 2008 at 7:09 PM

Hi,

From what I understand " If you deactivate the Membership Request List feature, then all registrants are automatically added to the site and the email goes out immediately.". I am not sure where in the code it sends out email if the Membership Request List feature is not activated. I looked at "MembershipRequestControl.cs". Please help me understand.

        protected override void OnCreatingUser(LoginCancelEventArgs e)
        {
            SPSite site = SPControl.GetContextSite(Context);
            if (site.Features[new Guid("{69CE2076-9A2F-4c71-AEDF-F4252C01DE4E}")] != null)
            {
                /* bms Prevent user from being added to the list multiple times if the user */
                /* is already in use.                                                       */
                if (Membership.GetUser(this.UserName) == null)
                {
                    MembershipRequest request = new MembershipRequest();
                    request.UserEmail = this.Email;
                    request.UserName = this.UserName;
                    request.PasswordQuestion = this.Question;
                    request.PasswordAnswer = this.Answer;
                    request.FirstName = this.FirstName;
                    request.LastName = this.LastName;
                    request.DefaultGroup = this._DefaultGroup;
                    MembershipRequest.CopyToReviewList(request);
                }
                this.MoveTo(this.CompleteStep);
            }
            else
            {
                base.OnCreatingUser(e);
                //Add the user to the default group
                site.RootWeb.Groups[this._DefaultGroup].AddUser(string.Format("{0}:{1}", System.Web.Security.Membership.Provider.Name.ToLower(), this.UserName.ToLower()), this.Email, this.FirstName + " " + this.LastName, "Self Registration");
            }
        }



Regards,
Manohar