Re: Check credentials with POGI
Adam Tauno Williams <[email protected]> Tue, 20 Sep 2005 16:56:46 -0400
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Organization | Morrison Industries |
| Message-ID | <[email protected]> |
> here's another question concerning POGI. When I try to connect to my
> OpenGroupware via xmlrpcd, how do I check if the connection was successfull?
> At the moment I check if the string length of $server->getCurrentActorLogin()
> is (> 0). I think this isn't the best way?!
The version on my local drive has a OGoServer:isLoggedIn method.
function isLoggedIn() {
if($this->currentActor != null)
return true;
else
return false;
}
OGoServer::login also returns a bool, by calling the above method.
function login($_username, $_password) {
$this->client->setCredentials(trim($_username),
trim($_password));
if (!isset($this->managers['account']))
$this->managers['account'] = new OGoAccountManager($this);
$this->currentActor =
$this->managers['account']->getCurrentActor();
return $this->isLoggedIn();
}
This works at least for my "MinyOGo" project - which is a very lite web
interface to OGo for use with devices with very limited displays.
--
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc