[LRUG] [Off Topic] Extracting a user id from a Mambo session

Andrew Stewart boss at airbladesoftware.com
Thu May 15 07:32:10 PDT 2008


Hello El Rug,

Oh, the horror.

I've built a lovely Ruby-based webapp for a client to replace a  
section of their Mambo website.  My webapp will be hosted on a  
subdomain of the domain where the Mambo site lives.

Only members of the client's organisation may use my webapp.  Not  
unreasonably, but rather irritatingly for me, the client has decreed  
that once somebody has logged into the main Mambo site, they shouldn't  
have to log in again to use my webapp.

I'm thinking the only way to do this is to:

1.  Grab the cookie which (I assume) Mambo sets when you log in.
2.  Extract the user's id from it.

Once I've got the user's id, everything's simple because the two apps  
share the same database.

However since I've never touched Mambo or PHP before, I don't know  
where to start looking for information on steps 1 and 2 above.

Can anybody help?

Thanks!

Regards,
Andy Stewart

-------
AirBlade Software
http://airbladesoftware.com







More information about the Chat mailing list