Exemplo n.º 1
0
        // Attempt Register Redirect:
        public JsonResult OnGetAttemptRegister()
        {
            // Get the query string:
            var    queryStringObject = Request.QueryString;
            string queryString       = queryStringObject.ToString();

            // Parse the query string and extract parameters:
            string[] queryParams = queryString.Split("&");
            string   name        = queryParams[1].Replace("name=", "");
            string   email       = queryParams[2].Replace("email=", "");
            string   occupation  = queryParams[3].Replace("occupation=", "");
            string   plantExpert = queryParams[4].Replace("plantExpert=", "");
            string   username    = queryParams[5].Replace("username="******"");
            string   password    = queryParams[6].Replace("password="******"");

            // Attempt the login and return the response:
            return(new JsonResult(UserManagement.AttemptRegister(name, email, occupation, plantExpert, username, password)));
        }