Ossn_loggedin_user in javascript

Rafael [redcrested.net] Posted in Technical Support 3 years ago

On my customer's site, I've put in the OssnLocation JS file to fill the Location field with ossn_loggedin_user()->place. When the cache is disabled, it works fine. But, when the cache is enabled, this field is filled with the admin's place to all users. Is there an equivalent ossn_loggedin_user() to be used in the javascript file?

[Update] The admin place is set to all users, when cache is enabled

Replies
Indonesian Arsalan Shah Replied 3 years ago

That's also the 3rd way. Glad you solved the problem :)

Breton Rafael [redcrested.net] Replied 3 years ago

After taking a look into how the OssnChat component works, I was able to do.

Thanks

Indonesian Arsalan Shah Replied 3 years ago

The only solution for this is loading the user location on runtime using ajax (may use cookie also) and initialize your component.