Changeset

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
parents 12991:6d7e3d5463d8
children 12993:623fbb5f9b05
files plugins/mod_admin_shell.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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);