Function Web.postUserCreate

POST "/user/create", validates new user details and inserts in db, redirects to GET "/" on success or to GET "/user/create" on failure

void postUserCreate (
  vibe.web.validation.ValidEmail email,
  vibe.web.validation.ValidPassword password,
  string name
);

This is a child to the user route "/user/" and handles the submitted create user form. The submitted data is checked to be valid, and checked to not already exist. If the user is auth'd they are redirected to GET "/". Else if the user does exist, or the submitted data isn't valid the user is redirected to GET "/user/create" with an error message. Else new user password is hashed, user details are inserted into the db, the user is auth'd and redirected to GET "/".

TODO

send confirmation email to user and login via link

Parameters

NameDescription
email field passed in via form
password field passed in via form
name field passed in via form