Mercurial > prosody-hg
diff plugins/mod_auth_insecure.lua @ 12674:72f431b4dc2c
Merge role-auth->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 22 Aug 2022 13:53:35 +0100 |
| parents | 32881d0c359f |
| children | 74b9e05af71e |
line wrap: on
line diff
--- a/plugins/mod_auth_insecure.lua Fri Aug 19 14:24:31 2022 +0200 +++ b/plugins/mod_auth_insecure.lua Mon Aug 22 13:53:35 2022 +0100 @@ -27,6 +27,7 @@ return nil, "Password fails SASLprep."; end if account then + account.updated = os.time(); account.password = password; return datamanager.store(username, host, "accounts", account); end @@ -38,7 +39,8 @@ end function provider.create_user(username, password) - return datamanager.store(username, host, "accounts", {password = password}); + local now = os.time(); + return datamanager.store(username, host, "accounts", { created = now; updated = now; password = password }); end function provider.delete_user(username)
