MyBB Community Forums

Full Version: Being "hidden" isn't so hidden if you know where to look
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I noticed it years ago, but it has been flagged again today

As you know, when a member sets their profile to "hidden" others can't see when they are online, or when they were last online.  However, if you go to the member's list page and order the members by "Last Visit", the (Hidden) members will be ordered in relation to when they were online, so is easy to determine when they were last online, or indeed are currently online

As an example - on this forum right this second, I can tell that despite being hidden both "iAndrew" & ".m." are online right now (or within the last 3min)

It's not a major bug, but something hidden members probably don't want others to determine so should be attended to IMO
So, basically you wanna say filtering by "Last Visit" should list the invisibles at the end of the listing?
(2019-06-29, 04:18 PM)effone Wrote: [ -> ]So, basically you wanna say filtering by "Last Visit" should list the invisibles at the end of the listing?

I don't think that would be the right solution.

There are 2 options as far as i see.

1) Exclude members from the memberlist completely when they have the invisible mark set.

2) Alternatively, exclude them only for the sort field = "lastvisit"
I think the best way would be to always hide the last visit time on profiles and the member list, and as suggested, not show them at all only when sorting by last visit.
(2019-06-29, 05:44 PM)Matt Wrote: [ -> ]I think the best way would be to always hide the last visit time on profiles and the member list, and as suggested, not show them at all only when sorting by last visit.

Any tips on how / where to place the "AND invisible != '1'" in the memberlist.php ? There's a hectic query going on there  Big Grin
(2019-06-29, 04:18 PM)effone Wrote: [ -> ]So, basically you wanna say filtering by "Last Visit" should list the invisibles at the end of the listing?

maybe by time of their last post (or any other public, non-hidden activity)

and you'd have to set the lastvisit field itself that way so nothing can leak it inadvertently and require patching all over the place

or maybe "hidden" is just the wrong word... how much hiding can you do when participating in a public forum. I think it's okay for it to simply mean "presence won't be announced in big red blinking letters on the front page"
A solution a different forum software uses is pausing the date when the member has selected to hide their status, so when you order by the last visit these members will drop down the list as time passes
In the memberlist.php around lines 353 - 361, find the query:

	$users = '';
	$query = $db->query("
		SELECT u.*, f.*
		FROM ".TABLE_PREFIX."users u
		LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
		WHERE {$search_query}
		ORDER BY {$sort_field} {$sort_order}
		LIMIT {$start}, {$per_page}
	");

and add before:

$search_query .= " AND u.invisible != 1";

I quickly tested this now, and it will remove hidden members from all the result sets on memberlist.php
It does - but also from Admin, which isn't ideal

I'm not a big fan of removing the member from the memberlist page TBH, just adequately hide their online date
(2019-06-30, 07:48 AM)NotAdmin Wrote: [ -> ]It does - but also from Admin, which isn't ideal

I'm not a big fan of removing the member from the memberlist page TBH, just adequately hide their online date

No it does not. Admins can view users easily via the ACP -> users & groups, where the hidden users will still be shown.

Hiding their online date is not going to do anything, the query needs to be modified.
Pages: 1 2