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

Paul Ardeleanu pardel at gmail.com
Thu May 15 08:31:55 PDT 2008


Hi Andrew,

On Thu, May 15, 2008 at 3:32 PM, Andrew Stewart <boss at airbladesoftware.com>
wrote:

> Hello El Rug,
>
> Oh, the horror.
>
> ...
>
> I'm thinking the only way to do this is to:
>
> 1.  Grab the cookie which (I assume) Mambo sets when you log in.


It is PHP what sets a cookie containing the session_id which, usually, maps
to a temporary file that holds the session content/variables.


>
> 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.


It wil be probably easier to use db based PHP sessions but there is a
performance hit there:
http://www.mysqlperformanceblog.com/2007/03/27/php-sessions-files-vs-database-based/

or pass the session_id to your Rails app.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20080515/156d501f/attachment-0003.html>


More information about the Chat mailing list