# HG changeset patch # User Michel Le Bihan # Date 1501601585 -7200 # Node ID c8161146c698779283a00f80cab6056b679ae6b3 # Parent b1c5b0c369c246498dd7d66f71f744374ee5a2ce mod_register_web: Add password confirmation field diff -r b1c5b0c369c2 -r c8161146c698 mod_register_web/mod_register_web.lua --- a/mod_register_web/mod_register_web.lua Thu Jul 27 16:46:18 2017 +0200 +++ b/mod_register_web/mod_register_web.lua Tue Aug 01 17:33:05 2017 +0200 @@ -128,6 +128,9 @@ if not registering.allowed then return nil, "Registration not allowed"; end + if form.confirm_password ~= form.password then + return nil, "Passwords don't match"; + end local ok, err = usermanager.create_user(prepped_username, form.password, module.host); if ok then local extra_data = {}; diff -r b1c5b0c369c2 -r c8161146c698 mod_register_web/templates/register.html --- a/mod_register_web/templates/register.html Thu Jul 27 16:46:18 2017 +0200 +++ b/mod_register_web/templates/register.html Tue Aug 01 17:33:05 2017 +0200 @@ -18,6 +18,10 @@ Password: + + Confirm Password: + + {captcha}