Re: Check credentials with POGI
Adam Tauno Williams <[email protected]> Tue, 18 Oct 2005 10:06:54 -0400
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2005-09-20 at 16:56 -0400, Adam Tauno Williams wrote:
> > 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?!
Did these extensions solve your problem?
> 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.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBDVQF9LRePpNle04MRAqvUAJ9RAxv5V80cZbnw2jLK54yWtgKUCACcCW/N +++DuX5Qne2iTppqJo8VcgU= =nqJ0 -----END PGP SIGNATURE-----