Hi @all,

I have a question about the built in system.connect method of the services package: What does this method do? It returns an object with a user and a session-id but the session id cannot be found in the sessions-database-table, which menas that there is no session started for this. So what is it for? :)

We would like to build two sites (one with drupal, one with another cms) and the other cms should be able to determine via a xmlrpc-call if the browsing user is logged in into the drupal site. Is this possible at all? And if so does the system.connect method help?

Thanx in advance & cheers

hctom

Comments

snelson’s picture

system.connect is mainly to be used when you are using services outside of the context of the browser, or in your case outside of drupal, so that apps can get a phpsessid to use in all subsequent method calls. A call to this method should create a record in the sessions table, and return a session id and anonymous user object. You need to have sessids turned on in services, and then use the returned sessid in all your method calls, including user.login. user.login may return a new sessid, I'm not sure so you may want to check that. In your external cms, you could probably read the drupal cookie for the drupal sessid, and pass an xmlrpc call to a drupal service method to determin login status.

hctom’s picture

ah cool.. thanx for the fast reply :) now i understand what system.connect is for... i'll give that a try, especially the cookie thing.

Thanx a lot & cheers

hctom

snelson’s picture

Status: Active » Closed (fixed)