public ServiceResult Register(SiteSettings siteSettings, RegisterMemberModel model, UmbracoHelper helper)
        {
            if (_umbracoMemberService.GetByUsername(model.Email) != null)
            {
                return(new ServiceResult(nameof(model.Email), "Email already registered"));
            }

            IDictionary <string, string> validationMessages = ValidateModel(model, model.UploadedPicture, helper);

            if (validationMessages.Any())
            {
                return(new ServiceResult(validationMessages));
            }

            string memberType = _umbracoMemberService.GetDefaultMemberType();

            IMember member = _umbracoMemberService.CreateMember(model.Email, model.Email, model.FullName, memberType);

            member.SetValue(MemberPropertyNames.ChapterId, helper.GetPublishedContentAsPropertyValue(model.ChapterId));

            IMedia picture = SaveImage(model.UploadedPicture, model);

            UpdateMemberProperties(member, model, helper, picture);

            int trialPeriodMonths = model.Chapter.GetPropertyValue <int>("trialPeriodMonths");

            UpdateMemberSubscriptionProperties(member, model, MemberTypes.Trial, DateTime.Today.AddMonths(trialPeriodMonths) - DateTime.Today);

            _umbracoMemberService.Save(member);
            _umbracoMemberService.SavePassword(member, model.Password);

            // Send emails
            SendNewMemberAdminEmail(siteSettings, model);
            SendNewMemberEmail(siteSettings, model);

            return(new ServiceResult(true));
        }