views:

170

answers:

0

Hi - I hope someone can advise / direct / shed some light on :

i have a rails application that uses Authlogic for authentication. i would like to incorporate cometchat into this application - (in reality any chat IM would do - but cometchat seemed to fit nicely because ajax-im does not like windows)

The environment is the following : The rails app is running on a windows machine - and will be available to the local network (no internet) So to be able to use cometchat - i am running the WAMP server.

Into the nitty gritty of php(which i dont know well at all)

authlogic keeps my user session for me.

but for cometchat to work i need to pass the getUserID function the current user. (comet chat assumes that there is a php session variable - but i dont have this with rails)

So how can i pass the rails session user to the getUserID function.

the function looks like this: *function getUserID() { $userid = 0;

if (!empty($_SESSION['userid'])) {
    $userid = $_SESSION['userid'];
}
return $userid;

}*

the next function has to do with the friends list - but im sure this can be solved with sql inside the php page once i have the current user.

Again - all and any guidance is welcome here. Even if it means an alternate chat solution.

Many thanks in advance.