mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
* src/ejabberd_auth.erl: Added check for domain of registered user
* src/web/ejabberd_web_admin.erl: Fixed user registration via web interface, fixed path to user's offline messages (thanks to Mickael Remond) SVN Revision: 323
This commit is contained in:
parent
d5b0b5c42b
commit
fa479b6384
@ -1,5 +1,11 @@
|
||||
2005-04-20 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_auth.erl: Added check for domain of registered user
|
||||
|
||||
* src/web/ejabberd_web_admin.erl: Fixed user registration via web
|
||||
interface, fixed path to user's offline messages (thanks to
|
||||
Mickael Remond)
|
||||
|
||||
* src/mod_disco.erl: Fixed domain listing when one virtual host is
|
||||
a subdomain of another
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
plain_password_required/0
|
||||
]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
|
||||
%%%----------------------------------------------------------------------
|
||||
%%% API
|
||||
%%%----------------------------------------------------------------------
|
||||
@ -45,7 +47,12 @@ set_password(User, Server, Password) ->
|
||||
(auth_module()):set_password(User, Server, Password).
|
||||
|
||||
try_register(User, Server, Password) ->
|
||||
(auth_module()):try_register(User, Server, Password).
|
||||
case lists:member(jlib:nameprep(Server), ?MYHOSTS) of
|
||||
true ->
|
||||
(auth_module()):try_register(User, Server, Password);
|
||||
false ->
|
||||
{error, not_allowed}
|
||||
end.
|
||||
|
||||
dirty_get_registered_users() ->
|
||||
(auth_module()):dirty_get_registered_users().
|
||||
|
@ -1151,8 +1151,12 @@ list_users_parse_query(Query) ->
|
||||
error ->
|
||||
error;
|
||||
#jid{user = User, server = Server} ->
|
||||
ejabberd_auth:try_register(User, Server, Password),
|
||||
ok
|
||||
case ejabberd_auth:try_register(User, Server, Password) of
|
||||
{error, _Reason} ->
|
||||
error;
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end;
|
||||
false ->
|
||||
nothing
|
||||
@ -1180,7 +1184,8 @@ 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 ++ "@" ++ Server ++ "/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