end;
process([<<"delete">>],
#request{method = 'POST', q = Q, lang = Lang,
- host = Host}) ->
- case form_del_post(Q, Host) of
+ host = _HTTPHost}) ->
+ case form_del_post(Q) of
{atomic, ok} ->
Text = (?T(<<"Your Jabber account was successfully "
"deleted.">>)),
%% should include the host where the POST was sent.
process([<<"change_password">>],
#request{method = 'POST', q = Q, lang = Lang,
- host = Host}) ->
- case form_changepass_post(Q, Host) of
+ host = _HTTPHost}) ->
+ case form_changepass_post(Q) of
{atomic, ok} ->
Text = (?T(<<"The password of your Jabber account "
"was successfully changed.">>)),
?INPUTS(<<"text">>, <<"username">>, <<"">>,
<<"20">>)]),
?XE(<<"li">>,
- [?CT(<<"Server:">>), ?C(<<" ">>), ?C(Host)]),
+ [?CT(<<"Server:">>), ?C(<<" ">>),
+ ?INPUTS(<<"text">>, <<"host">>, Host, <<"20">>)]),
?XE(<<"li">>,
[?CT(<<"Old Password:">>), ?C(<<" ">>),
?INPUTS(<<"password">>, <<"passwordold">>, <<"">>,
%%% Formulary change password POST
%%%----------------------------------------------------------------------
-form_changepass_post(Q, Host) ->
+form_changepass_post(Q) ->
case catch get_changepass_parameters(Q) of
- [Username, PasswordOld, Password, Password] ->
+ [Username, Host, PasswordOld, Password, Password] ->
try_change_password(Username, Host, PasswordOld,
Password);
[_Username, _PasswordOld, _Password, _Password2] ->
{value, {_Key, Value}} = lists:keysearch(Key, 1, Q),
Value
end,
- [<<"username">>, <<"passwordold">>, <<"password">>,
+ [<<"username">>, <<"host">>, <<"passwordold">>, <<"password">>,
<<"password2">>]).
try_change_password(Username, Host, PasswordOld,
?INPUTS(<<"text">>, <<"username">>, <<"">>,
<<"20">>)]),
?XE(<<"li">>,
- [?CT(<<"Server:">>), ?C(<<" ">>), ?C(Host)]),
+ [?CT(<<"Server:">>), ?C(<<" ">>),
+ ?INPUTS(<<"text">>, <<"host">>, Host, <<"20">>)]),
?XE(<<"li">>,
[?CT(<<"Password:">>), ?C(<<" ">>),
?INPUTS(<<"password">>, <<"password">>, <<"">>,
%%% Formulary delete POST
%%%----------------------------------------------------------------------
-form_del_post(Q, Host) ->
+form_del_post(Q) ->
case catch get_unregister_parameters(Q) of
- [Username, Password] ->
+ [Username, Host, Password] ->
try_unregister_account(Username, Host, Password);
_ -> {error, wrong_parameters}
end.
{value, {_Key, Value}} = lists:keysearch(Key, 1, Q),
Value
end,
- [<<"username">>, <<"password">>]).
+ [<<"username">>, <<"host">>, <<"password">>]).
try_unregister_account(Username, Host, Password) ->
try unregister_account(Username, Host, Password) of