Project

General

Profile

Check user account exist

shir Hu
Added almost 4 years ago

Hello,

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="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-user-password" action="excute"/>
</iq>

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 almost 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.

(1)

Added by shir Hu almost 4 years ago

OK, I see, Thanks.

    (1-2/2)