Software /
code /
prosody
Diff
plugins/mod_admin_shell.lua @ 12992:651813914151
mod_admin_shell: Enable user after creation with role
Fixes that otherwise the user was created in a disabled state and left
as such.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Mar 2023 16:45:34 +0200 |
parent | 12991:6d7e3d5463d8 |
child | 12993:623fbb5f9b05 |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Sun Mar 26 16:45:23 2023 +0200 +++ b/plugins/mod_admin_shell.lua Sun Mar 26 16:45:34 2023 +0200 @@ -1533,6 +1533,11 @@ 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);