Software /
code /
prosody-modules
Diff
mod_register_web/mod_register_web.lua @ 2733:c8161146c698
mod_register_web: Add password confirmation field
author | Michel Le Bihan <michel@lebihan.pl> |
---|---|
date | Tue, 01 Aug 2017 17:33:05 +0200 |
parent | 1778:32604bf33a4c |
child | 2739:7d864a03b509 |
line wrap: on
line diff
--- 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 = {};