cometchat for oxwall | Forum

Johnny Jun 8 '11
Hi,

just a query, I have a cometchat and i want to install it to oxwall. now the comchat itself doesn't have any pre config for oxwall and it will be done with some instruction now they instruct me to change this:

[code]
If you have written a simple PHP authentication, then during the authentication, you can specify a session variable like:

/* In your own login.php */
/* After you authenticate the user */
$_SESSION['userid'] = $users['id']; // Modify to suit requirements
Then your getUserID() function will look like:

function getUserID() {
$userid = 0; // Return 0 if user is not logged in

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

return $userid;
}
If you are using a cookie then read that using the following function:

function getUserID() {
$userid = 0; // Return 0 if user is not logged in

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

return $userid;
}
[end of code]


What shall I replace on the code so that I can get the userid of the one who login in the oxwall?

If am successful with this i might create a plugin (from the moment I understand everything)
The Forum post is edited by Johnny Jun 8 '11
Please let me know if you have found the solution for this. I am also looking for this information.

If not lets try together to solve this.
Team
Michael I. May 29 '12
Topic was moved from General Questions.