query( "CREATE table if not exists user ( id integer primary key autoincrement, email text not null unique, hash text not null)"); $varUsers = $c->query("SELECT * from user where email like ?", $strEmail); if (count($varUsers) > 0) throw new Exception("E-mail address in use"); $strHash = sha1($strPassword); $c->query( "INSERT into user (email, hash) values (?, ?)", $strEmail, $strHash); BootstrapRender::message("Registration was a success, please sign in to continue."); Respond::redirect("/user/signin"); } } catch (Exception $x) { BootstrapRender::message($x->getMessage(), "danger"); } ?>
"email", "label" => "E-Mail Address", "value" => Request::getPosted("email") ]); ?> "password", "label" => "Password", "value" => Request::getPosted("password"), "type" => "password", ]); ?> "repeat", "label" => "Repeat Password", "value" => Request::getPosted("repeat"), "type" => "password", ]); ?>