Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- if(IsPost){
- WebSecurity.Logout();
- string username = Request.Form["username"];
- string password = Request.Form["password"];
- string confirmPassword = Request.Form["confirmPassword"];
- if(password != confirmPassword){
- Json.Write("Wachtwoord komt niet overeen.", Response.Output);
- }
- else {
- if(WebSecurity.UserExists(username)){
- Json.Write(String.Format("Gebruiker '{0}' bestaat al.", username), Response.Output);
- }
- else{
- WebSecurity.CreateUserAndAccount(username,password,null,false);
- WebSecurity.Login(username, password, true);
- Json.Write("success", Response.Output);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement