From 8720067f241ebc2a23b4d5ab9fb68beba9e61d53 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 26 Mar 2023 16:45:34 +0200 Subject: mod_admin_shell: Enable user after creation with role Fixes that otherwise the user was created in a disabled state and left as such. --- plugins/mod_admin_shell.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 8c6bab9d..c652fa96 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -1533,6 +1533,11 @@ function def_env.user:create(jid, password, role) if not ok then return nil, "Could not set password for user: "..err; end + + local ok, err = um.enable_user(username, host); + if not ok and err ~= "method-not-implemented" then + return nil, "Could not enable user: "..err; + end end else local ok, err = um.create_user(username, password, host); -- cgit v1.2.3