mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
mod_admin_shell: Rename user:setrole to user:set_roles
This is more readable and accessible, and it will only be harder to change after release.
This commit is contained in:
parent
f8a9943d17
commit
56dc05885e
1 changed files with 4 additions and 4 deletions
|
@ -1839,10 +1839,10 @@ function def_env.user:role(jid, host)
|
|||
end
|
||||
def_env.user.roles = def_env.user.role;
|
||||
|
||||
describe_command [[user:setrole(jid, host, role) - Set primary role of a user (see 'help roles')]]
|
||||
-- user:setrole("someone@example.com", "example.com", "prosody:admin")
|
||||
-- user:setrole("someone@example.com", "prosody:admin")
|
||||
function def_env.user:setrole(jid, host, new_role)
|
||||
describe_command [[user:set_role(jid, host, role) - Set primary role of a user (see 'help roles')]]
|
||||
-- user:set_role("someone@example.com", "example.com", "prosody:admin")
|
||||
-- user:set_role("someone@example.com", "prosody:admin")
|
||||
function def_env.user:set_role(jid, host, new_role)
|
||||
local username, userhost = jid_split(jid);
|
||||
if new_role == nil then host, new_role = userhost, host; end
|
||||
if not prosody.hosts[host] then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue