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)