ejabberd - Comments for "Add option to mod_ctlextra, something get wrong ?" https://www.ejabberd.im/node/3396 en working :) https://www.ejabberd.im/node/3396#comment-54028 <p>thanks badlop, you are the king :)</p> <p>I did something a bit similar but without the check. thanks again, I get your code.</p> <p>regards,<br /> kollo</p> Fri, 20 Feb 2009 19:06:58 +0000 kollo comment 54028 at https://www.ejabberd.im Try this patch https://www.ejabberd.im/node/3396#comment-54027 <p>Try this patch:</p> <pre> --- src/mod_ctlextra.erl (revisiĆ³n: 873) +++ src/mod_ctlextra.erl (copia de trabajo) @@ -49,6 +49,7 @@ {"delete-older-users days", "delete users that have not logged in the last 'days'"}, {"delete-older-users-vhost host days", "delete users that not logged in last 'days' in 'host'"}, {"set-password user server password", "set password to user@server"}, + {"get-password user server", "get password of user@server"}, %% ejd2odbc {"export2odbc server output", "export Mnesia tables on server to files on output directory"}, @@ -143,6 +144,18 @@ ejabberd_auth:set_password(User, Server, Password), ?STATUS_SUCCESS; +ctl_process(_Val, ["get-password", User, Server]) -&gt; + case ejabberd_auth:get_password(User, Server) of + false -&gt; + Res = "Account does not exist", + io:format("~s~n", [Res]), + ?STATUS_ERROR; + Password when is_list(Password) -&gt; + Res = Password, + io:format("~s~n", [Res]), + ?STATUS_SUCCESS + end; + ctl_process(_Val, ["vcard-get", User, Server, Data]) -&gt; {ok, Res} = vcard_get(User, Server, [Data]), io:format("~s~n", [Res]), </pre> Fri, 20 Feb 2009 10:08:02 +0000 mfoss comment 54027 at https://www.ejabberd.im