Added policy enforcement to the sidebar online block and the full online page.
Thanks @JamesBrown for reporting.
Important note: Online and visible staff members will be still listed despite user's permissions (this is a design decision). Staff members who choose to be visible most likely want users to know about it.
This has been changed also in posts.
- Fixed Undefined index: permissions which occurred in some cases.
- User's invisibility will automatically turn off if user no longer allowed to edit this setting. (Previously user couldn't change the setting, but he was still invisible due to the option being enabled). This happens on user's next visit, so if mistakenly set there's still time to revert it.