コード例 #1
0
 private SelfIdentificationViewModel BuildSelfId()
 {
     return(_identificationViewModel = new SelfIdentificationViewModel()
     {
         // set options
         RequestEmail = true,
         RequestPassword = true,
         RequestPhoneNumber = true
     });
 }
コード例 #2
0
        private void SetDefaults()
        {
            CaptchaSettings captchaSettings = EngineContext.Current.Resolve <CaptchaSettings>();

            this._identificationViewModel = BuildSelfId();

            this.Member          = _identificationViewModel.Member;
            this.CurrentCustomer = _identificationViewModel.Customer;
            this.DisplayCaptcha  = captchaSettings.Enabled;
        }
コード例 #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);
        }