Comet chat integration in Codeigniter not showing user list

507 Views Asked by At

I am using Comet Chat codeigniter plugin to show a chat in my website. I did everything as said in the documentation.

I referred pages from here. But it is just showing the chat screen only. Nothing else. I saw all the tables created in the database. And the documentation is too poor in content. There is no core details available.

I am not able to see any errors as well. Please help to fix this.

1

There are 1 best solutions below

0
On

In this case you need to initiate your session first and get userid.

Please update function getUserID() in integration.php file.

$file=dirname(dirname(__FILE__)). DIRECTORY_SEPARATOR .  $config['sess_save_path'] . DIRECTORY_SEPARATOR . 'ci_session'. $_COOKIE['ci_session'];

if (file_exists($file)) {
    $file = file_get_contents($file, FILE_USE_INCLUDE_PATH);
    session_decode($file);
    $userid = $_SESSION['UserInfo']['id'];
}

now by implementing session vars you will get userid of current logged in user and then cometchat will start displaying data.