mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-17 13:58:38 +02:00
Fixes a bug on the web interface: On user creation screen the user creation was using the function try_register/2 instead of the new one try_register/3; The link to the message queue were also missing the server.
SVN Revision: 321
This commit is contained in:
parent
caba9d7aef
commit
361985f034
@ -1143,23 +1143,22 @@ list_users(Query, Lang) ->
|
||||
list_users_parse_query(Query) ->
|
||||
case lists:keysearch("addnewuser", 1, Query) of
|
||||
{value, _} ->
|
||||
{value, {_, User}} =
|
||||
{value, {_, JIDString}} =
|
||||
lists:keysearch("newusername", 1, Query),
|
||||
{value, {_, Password}} =
|
||||
lists:keysearch("newuserpassword", 1, Query),
|
||||
case jlib:nodeprep(User) of
|
||||
case jlib:string_to_jid(JIDString) of
|
||||
error ->
|
||||
error;
|
||||
"" ->
|
||||
error;
|
||||
_ ->
|
||||
ejabberd_auth:try_register(User, Password),
|
||||
#jid{user = User, server = Server} ->
|
||||
ejabberd_auth:try_register(User, Server, Password),
|
||||
ok
|
||||
end;
|
||||
false ->
|
||||
nothing
|
||||
end.
|
||||
|
||||
|
||||
list_users_in_diapason(Diap, Lang) ->
|
||||
Users = ejabberd_auth:dirty_get_registered_users(),
|
||||
SUsers = lists:sort([{S, U} || {U, S} <- Users]),
|
||||
@ -1181,7 +1180,7 @@ list_given_users(Users, Prefix, Lang) ->
|
||||
fun(SU = {Server, User}) ->
|
||||
US = {User, Server},
|
||||
QueueLen = length(mnesia:dirty_read({offline_msg, US})),
|
||||
FQueueLen = [?AC(Prefix ++ "user/" ++ User ++ "/queue/",
|
||||
FQueueLen = [?AC(Prefix ++ "user/" ++ User ++ "@" ++ Server ++ "/queue/",
|
||||
integer_to_list(QueueLen))],
|
||||
FLast =
|
||||
case ejabberd_sm:get_user_resources(User, Server) of
|
||||
|
Loading…
Reference in New Issue
Block a user