Exemplo n.º 1
0
        public bool ExecuteMigrate(IList <IViewModel> fields)
        {
            var firstName = fields.GetFieldValue("FirstName");
            var lastName  = fields.GetFieldValue("LastName");
            var email     = fields.GetFieldValue("Email");
            var password  = fields.GetFieldValue("Password");
            //var country = fields.GetFieldValue("Country");
            var githubUser   = fields.GetFieldValue("GithubUser");
            var twitterUser  = fields.GetFieldValue("TwitterUser");
            var linkedInUser = fields.GetFieldValue("LinkedInUser");

            if (!string.IsNullOrEmpty(firstName) && !string.IsNullOrEmpty(lastName) && !string.IsNullOrEmpty(email) &&
                !string.IsNullOrEmpty(password) && !string.IsNullOrEmpty(githubUser))
            {
                var loginUser        = new LoginUser();
                var registerResponse = loginUser.Register(email, password, firstName, lastName, twitterUser, githubUser, linkedInUser);
                // make the sitecore user

                return(registerResponse);
            }

            return(false);
        }