Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Help with cookies

7 years 1 month ago
  • Lucio's Avatar
    Topic Author
  • Lucio
  • Offline
  • Fresh Boarder
  • Posts: 60
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Active Socialize Active

Dear Jomsocial gentlemen, I need the help of you to create a cookie, that asks me for the support of my chat so that it works me correctly.
"The thing is that CometChat requires userid of logged in users to work. In Joomla integration, CometChat fetches the userid in the database of Joomla table called "gaf2j_session". However, in your Joomla installation due to some irregularities we are unable to find the user id of your logged in user in the table "gaf2j_session" in some scenarios. That is why the user is logged in and sometimes they are not.
You do not need to reinstall anything to make this work. Just ask your developer to create a cookie called "cc_data" when a user logs in on your website to His account and to delete the same "cc_data" when a user logs out. The value of this cookie should be the userid of the logged in user.
Once this is configured CometChat will work as desired."

7 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

You can use this simply code to check the logged user id

$userID  = CFactory::getUser();

7 years 4 weeks ago
  • Lucio's Avatar
    Topic Author
  • Lucio
  • Offline
  • Fresh Boarder
  • Posts: 60
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Active Socialize Active

This does not help much:
I need to create a cookie called "cc_data" when a user logs in on his website to his account and to delete the same "cc_data" when a user logs out. The value of this cookie should be the userid of the logged in user.
How do I do that?

7 years 3 weeks ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

you need create custom plugin for this, and register your own cookie there.
please read this for the documentation docs.joomla.org/J3.x:Creating_an_Authent...on_Plugin_for_Joomla

OR hack our jomsocial redirect plugin, on that plugin we already have function logout and login, you only need set your cookie code there..check this file /plugins/system/jomsocialredirect/jomsocialredirect.php

thank you!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW