$this->jab->login($this->jab->NewUserName,$this->jab->NewUserPass) $this->GivenName = iconv('CP1251','UTF-8',$firstn) // conversion from russian charset :) Here is class to handle second call to CommandJabber clase - to fill out vcardįunction AddVcard(&$jab,$name,$pass,$firstn,$lastn,$patro,$sex,$role) called after a login to indicate the the login was successful $this->jab->login(JABBER_USERNAME,JABBER_PASSWORD) now that we're connected, tell the Jabber class to login called when a connection to the Jabber server is established This class handles events fired by the first call of CommandJabber client class (to create a user) #Ejabberd stired users passwordset your Jabber server hostname, username, and password hereĭefine('JABBER_PASSWORD','coolpassword') ĭefine('RUN_TIME',5) // set a maximum run time of 5 secondsĭefine('CBK_FREQ',1) // fire a callback event every second #Ejabberd stired users registrationto deny inband registration to everyone, but admins (accounts set in ACL as "admin") you should: before use my solution, someone should download it from somewhere :)Īlso. I used a "Jabber Client Library" - Version 0.9rc2 - Copyright 2002-2007, Centova Technologies Inc. I choosed another way - to emulate jabber-client with one Jabber-client class. I should write a parser, etc.Īnd both things - absolutely unable to create a vcard entries on behalf of new user. even when I change ejabberdctl permissions, it failed because permissions to DB-files (as I understand). ejabberdctl, when I called it from PHP, as web-server user have a limitation on file access rules. both methods (ejabberdctl and XML-RPC) is not good.īecause. Due to my tasks, new account should be started with some minimum vcard info.ĭuring my research. and after that ejabberd account should be set up. User should fill registration info on website, than be approved by local admin (this project for children). According with my tasks, inband registration is restricted. I'd like to create ejabberd users with PHP script.ġ. Finally, I managed to choose the most appropriate solution to automatically create users in ejabberd.Īs my needs is web.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |