[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-hackers] Savannah & phpGroupWare
From: |
Loic Dachary |
Subject: |
[Savannah-hackers] Savannah & phpGroupWare |
Date: |
Sun, 7 Oct 2001 01:11:55 +0200 |
Hi,
I've just built a set of packages for phpgroupware including patches
to allow account creation thru xmlrpc at
http://france.fsfeurope.org/debian
The patches were submitted to
phpgroupware (http://sourceforge.net/tracker/?group_id=7305&atid=307305). They
are lightweight and I hope they will be accepted soon.
Attached to this mail is a sample code to create an account
with xmlrpc. I find this honestly simple. The only drawback is that
phpGroupWare is not documented and you therefore have to dig in the
code to figure out what are the valid arguments. A small price to pay,
IMHO.
If you ever try to install the packages, make sure you do it
on a Debian testing or unstable, unless you want to help debug the
packaging ;-) I applied changes according to the suggestions of
David Delon <address@hidden> but they only fix part of the problems
related to "stable", the most annoying being the lack of wwwconfig-common
package. My own setup is php3 + mysql. I submitted those packages
for inspection by the Debian maintainer of the 0.9.12 phpGroupWare
package (address@hidden) but got no feedback yet.
I'll simplify the packaging using and extending xmlrpc awareness
of phpGroupWare so that no web interaction is necessary immediately after
the apt-get install. Once this is done I think we will be fully equiped
to develop the new Savannah code.
Cheers,
use Frontier::Client;
use Data::Dumper;
# Make an object to represent the XML-RPC server.
$server_url = 'http://loic.dachary.org/phpgroupware/xmlrpc.php';
$server = Frontier::Client->new(url => $server_url);
# Call the remote server and get our result.
$result = $server->call('system.listMethods');
print Data::Dumper->Dump($result);
$result = $server->call('system.login', { 'username' => 'admin', 'password'
=> 'xxxxxx' });
print $result;
print Dumper($result);
$server_url =
"http://$result->{'sessionid'}:$result->{'kp3'address@hidden/phpgroupware/xmlrpc.php";
print STDERR $server_url;
$server = Frontier::Client->new(url => $server_url);
$result = $server->call('admin.boaccounts.list_methods', 'xmlrpc');
print Dumper($result);
$result = $server->call('admin.boaccounts.rpc_add_user', {
'account_type' => 'u',
'status' => 'A',
'account_status' => 'A',
'account_lid' => 'bar3',
'account_firstname' => 'Bar',
'account_lastname' => 'Enbar',
'account_passwd' => 'a',
'account_passwd_2' => 'a',
'account_permissions' => [ 'preferences' ]
});
print Dumper($result);
Cheers,
--
Loic Dachary http://www.dachary.org/ address@hidden
24 av Secretan http://www.senga.org/ address@hidden
75019 Paris Tel: 33 1 42 45 09 16 address@hidden
GPG Public Key: http://www.dachary.org/loic/gpg.txt
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-hackers] Savannah & phpGroupWare,
Loic Dachary <=