4 * Script that synchronizes ejabberd users with kyberia
8 $echo='echo '; //Test only...
9 $jabber_domain=escapeshellarg('kyberia.cz');
11 // Use relative address of config file
12 // Change this, if you move you cron directory.
13 $dir=substr(__FILE__
, 0, strrpos(__FILE__
, '/'));
14 require($dir.'/../wwwroot/config/config.inc');
16 //require(INCLUDE_DIR.'/log.inc');
17 require(INCLUDE_DIR
.'/database.inc');
18 //require(INCLUDE_DIR.'/nodes.inc');
19 //require(INCLUDE_DIR.'/permissions.inc');
20 //require(INCLUDE_DIR.'/ubik.inc');
21 //require(INCLUDE_DIR.'/senate.inc');
23 //REGISTRATION_VOTES CONSTANT DEFINED IN INC/SENATE.INC
24 define('REGISTER_TEXT','request for access');
26 $_SESSION['user_id']=UBIK_ID
;
28 $db=new CLASS_DATABASE();
30 $q='SELECT * FROM users;';
35 $user=escapeshellarg($set->getString('login'));
36 $pass=escapeshellarg(md5('jabber:'.$set->getString('password')));
37 system($echo."ejabberdctl register $user $jabber_domain $pass");
38 system($echo."ejabberdctl set-password $user $jabber_domain $pass"); //needs mod_ctlextra installed in ejabberd
42 * mnesia:dirty_read(passwd, {"harvie", "kyberia.cz"}).
43 * mnesia:dirty_write({passwd, {"harvie", "kyberia.cz"}, "HESLOO"}).
This page took 0.505928 seconds and 4 git commands to generate.