changeset 4078:2f0c8670d2fa

mod_invites: Add API to create account reset invites (from Snikket)
author Matthew Wild <mwild1@gmail.com>
date Mon, 07 Sep 2020 13:00:43 +0100
parents f85ea76447dd
children b68b917e568f
files mod_invites/mod_invites.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites/mod_invites.lua	Mon Sep 07 12:59:00 2020 +0100
+++ b/mod_invites/mod_invites.lua	Mon Sep 07 13:00:43 2020 +0100
@@ -64,6 +64,11 @@
 	return create_invite("register", jid, true, additional_data);
 end
 
+-- Create invitation to reset the password for an account
+function create_account_reset(account_username) --luacheck: ignore 131/create_account_reset
+	return create_account(account_username, { allow_reset = account_username });
+end
+
 -- Create invitation to become a contact of a local user
 function create_contact(username, allow_registration, additional_data) --luacheck: ignore 131/create_contact
 	return create_invite("roster", username.."@"..module.host, allow_registration, additional_data);