Check user account exist

shir Hu
Added about 4 years ago


I want to check if user exists before register, some method has tried :

  1. Use module "VCardModule", but no matter the user exists or not , also return " " [Not feasible]

  2. By response of login, wrong password or not exist user return same exception [Not feasible]

  3. XEP-0133, send xml to get password with login user "admin@etw-pc" and query jid "shir@etw-pc":

<iq id="getAccountInfo" to="etw-pc" xml:lang="en" from="admin@etw-pc" type="set">
   <command xmlns="" node="" action="excute"/>

return " The recipient is no longer available " [Not feasible]

  1. try to register account, and get if user exist by register result [Feasible]

Only method 4 can do this, but I think it is not a good method, if I want to change password or other things , what can I do ? Is there any methods or functions to do something like XEP-0133 ?

Replies (2)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

There is no get-user-password ad-hoc script implemented in Tigase. I would say, that in case you need to check if user exists you could create new ad-hoc groovy script that would call tigase.db.UserRepository.userExists(BareJID) for particular user.


Added by shir Hu about 4 years ago

OK, I see, Thanks.