private SelfIdentificationViewModel BuildSelfId()
 {
     return(_identificationViewModel = new SelfIdentificationViewModel()
     {
         // set options
         RequestEmail = true,
         RequestPassword = true,
         RequestPhoneNumber = true
     });
 }
        private void SetDefaults()
        {
            CaptchaSettings captchaSettings = EngineContext.Current.Resolve <CaptchaSettings>();

            this._identificationViewModel = BuildSelfId();

            this.Member          = _identificationViewModel.Member;
            this.CurrentCustomer = _identificationViewModel.Customer;
            this.DisplayCaptcha  = captchaSettings.Enabled;
        }
Exemple #3
0
        public bool ResetDefaults(SelfIdentificationViewModel s)
        {
            if (s.Customer == null)
            {
                var workContext = EngineContext.Current.Resolve <IWorkContext>();
                if (workContext != null)
                {
                    s.Customer = workContext.CurrentCustomer;
                    return(true);
                }
            }

            return(false);
        }