# HG changeset patch # User Matthew Wild # Date 1766155810 0 # Node ID 42e035cd332281d66c53c9f039a9ee88fbe4dca0 # Parent fbfc06c5f3a8244593ce5961cf0f2b9d6fce19b8# Parent f0b2a05bcedc99930cb5e2a3b0db588e3009da16 Merge 13.0->trunk diff -r fbfc06c5f3a8 -r 42e035cd3322 plugins/mod_invites.lua --- a/plugins/mod_invites.lua Mon Dec 15 12:14:27 2025 +0000 +++ b/plugins/mod_invites.lua Fri Dec 19 14:50:10 2025 +0000 @@ -1,5 +1,6 @@ local id = require "prosody.util.id"; local it = require "prosody.util.iterators"; +local usermanager = require "prosody.core.usermanager"; local url = require "socket.url"; local jid_node = require "prosody.util.jid".node; local jid_split = require "prosody.util.jid".split; @@ -302,10 +303,13 @@ }; handler = function (self, user_jid, opts) --luacheck: ignore 212/self - local username = jid_split(user_jid); + local username, host = jid_split(user_jid); if not username then return nil, "Supply the JID of the account you want to generate a password reset for"; end + if not usermanager.user_exists(username, host) then + return nil, "The specified user account does not exist: " .. username; + end local duration_sec = require "prosody.util.human.io".parse_duration(opts and opts.expires_after or "1d"); if not duration_sec then return nil, "Unable to parse duration: "..opts.expires_after;