Show last activity of a user on the profile card
It still shows the last activity whether checked or not.
If you are an admin, you can always see the last activity. Other users only can see if itβs enabled.
Shahjahan JewelΒ it's showing for everyone. You can see in the video I'm linking to: https://share.jeffbrigman.com/Wnu9ZNZ2
Jeff BrigmanΒ Yes, I see it too.
Shahjahan JewelΒ I'm still experiencing this issue where none logged in visitors can see the last activity. Can you guys please check into this?
Shahjahan JewelΒ Raiyan MarzanΒ I was able to finally figure this out on my own after digging into the code and a lot of searching. Here's what I found:
When that option is disabled, it only hides the last activity on the members page but not the individual profiles for non-moderators and visitors not logged in. So when it's enabled, everyone can see the last activity on the members page, and visitors if you have allowed them to see that page.
However, the code shows those areas are populated from two different locations. The first for members page is ProfileHelper.php and for the individual profiles from ProfileController.php. ProfileHelper has the conditional code for that setting, ProfileController does not.
To test my theory, I removed line 35 'last_activity' => $xprofile->last_activity on ProfileController.php, and then at line 45 I pasted the conditional from the other file... and it works now like it should and removes the last activity from the individual profile pages also if that option is not enabled (unless the Helper::isModerator) or adds it if it is enabled.
Jeff BrigmanΒ Thanks. We will take a look and definitely patch it.
On a side note, I did fatal error my site a few times trying to get it sorted out.. but it's all good because I have daily backups.