I am trying to have it so that different users see different channels, when they view the chat.
I have integrated by own authentication system into the chat, to allow access only to certain members then, depending on their permissions, they will be able to view a certain group.
ie;
admins can see the 'admin' channel
users can see the 'user' channel
And so forth.
So, in the parameters I have something like the following (Simplified version, but you get the idea):
- Code: Select all
if($isAdmin){
$params['channels'] = array('admins');
}else{
$params['channels'] = array('users');
}
But this doesn't work as expected.
It seems like even the channels parameter is cached, which means that everyone get thrown into the same channel, regardless of what is defined on page load.
If I '/rehash', clear my cache, log out and in again, I get entered into the correct channel, but then everyone else who logs in afterwards goes into the same channel.
Is there any way to dynamically put people into different channels when the chat is loaded?
Kind regards,
Lee