Hi,
Please help if you can.
I am using the Gum Theme
and I have installed CometChat
I have set Cometchat to login user with the osclass login
However its not working
Comet chat have provided this information to me:
Kindly follow the following steps to create a cookie or unset a cookie, to configure chat with your application. Thus you need to create a cc_data cookie, which stores logged in user's id. When user is logged in, in your application.
When you login, use the following format to set the cookie
setcookie('cc_data', $userid, time() + (86400 * 30), "/");
And when the user is logged out from your application, you need to unset the cc_data cookie in the following manner.
When you logout use the following format to un set the cookie
setcookie('cc_data', '', -time() + (86400 * 30), "/");
Also in installation.php file which is in "CometChat" folder change below things
find "getUserID" and just before "$userid = intval($userid);"
if (!empty($_COOKIE['cc_data'])) {
$userid = $_COOKIE['cc_data'];
}
Note: This article would help you when you are not able to set user information in a session. For example, you are using Codeigniter or using a cloud solution. When user login is needed, and you are unable login user, we ask you to create a cookie named "cc_data" as described above.
However, I do not know where to insert/replace the code in osclass?
Any help would be appreciated