Page 2 of 2

Re: Rooms showing hidden users online to guests

Posted: 10 Sep 2019, 10:22
by kasimi
:+1:

Re: Rooms showing hidden users online to guests

Posted: 10 Sep 2019, 10:54
by Gary
In the template called mchatroom_users.html

I tried using that phpbb conditional you said and it still doesn't work.

I tried wrapping the online code in that template with this, expecting it would only show users online information to members and not guests. But it also hides it from logged in users as well.

Code: Select all

- This code is only accessible to donors -
{% if S_USER_LOGGED_IN %}
<ul class="mchat-rooms-users">
{% for user in loops.mchatroom_users %}
<li data-mchatrooms-user="{{ user.USER_ID }}" data-mchatrooms-room="{{ user.ROOM_ID }}">{{ user.USER_NAME }}{% if user.IS_KICKABLE %} <a href="#" data-mchatrooms-action="kick" title="{{ lang('MCHATROOMS_KICK') }}"><i class="icon fa fa-times-circle fa-fw" aria-hidden="true"></i><span class="sr-only">{{ lang('MCHATROOMS_KICK') }}</span></a>{% endif %}</li>
{% endfor %}
</ul>
{% endif %}

Re: Rooms showing hidden users online to guests

Posted: 10 Sep 2019, 13:26
by Gary
Removed this, found out it's some people playing games against the shoutbox that have managed to keep causing that error to happen on and off

Re: Rooms showing hidden users online to guests

Posted: 12 Sep 2019, 16:20
by kasimi
The template file is loaded by AJAX which doesn't render any page header which is where S_USER_LOGGED_IN is assigned to the template. Use {% if user.data.is_registered %} instead.