diff options
Diffstat (limited to 'plugins/mod_admin_shell.lua')
-rw-r--r-- | plugins/mod_admin_shell.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index b7800764..98ddc7e3 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -1335,9 +1335,7 @@ function def_env.user:roles(jid, host, new_roles) if new_roles == nil then host, new_roles = userhost, host; end if not prosody.hosts[host] then return nil, "No such host: "..host; - elseif not prosody.hosts[userhost] then - return nil, "No such host: "..userhost; - elseif not um.user_exists(username, userhost) then + elseif prosody.hosts[userhost] and not um.user_exists(username, userhost) then return nil, "No such user"; end return um.set_roles(jid, host, coerce_roles(new_roles)); |