Please upgrade here. These earlier versions are no longer being updated and have security issues.

Allow staff to see hidden users?

This discussion is related to the Who’s Online addon.
LincLinc Director of DevelopmentDetroit Vanilla Staff
edited January 2011 in Vanilla 2.0 - 2.3
Are there any plans to add a permission level to "override" hidden users to let them be seen by certain roles? My moderators would like to be able to see who is skulking about and I'd like to be able to add that for them.

Comments

  • Just for you @Lincoln I have added it to the latest 0.9 release, worth checking it works. I did some testing and didn't encounter a problem. The database has also changed slightly to not use datetime field and now there is an Invisible field.
  • LincLinc Director of Development Detroit Vanilla Staff
    Thanks! Much appreciated.
  • TimTim Operations Vanilla Staff
    Mayhem will love this. I'll install it there and let you know if there are any bugs.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Operations Vanilla Staff
    Yeah there's a bug. In your structure, you've added the UserID column using 'PrimaryKey()', but that creates an autoincrement field by default. I think you want to change it to something like:

    ->Column('UserID', 'int(11)', FALSE, 'primary')

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • @Tim Thanks, completely forgot that it will auto increment. I have made the fix.
    @Lincoln you should re-download the latest version, or just make the change above.
  • TimTim Operations Vanilla Staff
    This most recent update seems to have another flaw. People aren't falling off the list after being gone for some time. The list just grows and grows haha.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Operations Vanilla Staff
    edited January 2011
    Found the issue. In the module code, where you select from the Whosonline table:
    $SQL
    ->Select('u.UserID, u.Name, w.Timestamp, w.Invisible')
    ->From('Whosonline w')
    ->Join('User u', 'w.UserID = u.UserID')
    ->Where('w.Timestamp >=', $History)
    ->OrderBy('u.Name');
    Now that you've changed the Timestamp column to a datetime, you need to change the format of the data you compare it with:

    ->Where('w.Timestamp >=', date('Y-m-d H:i:s',$History))

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • @Tim And fixed again, sorry about that. Note to self: Don't change something if you don't have too. There is no easy way to test it, without launching a few different browsers unless you have an active community.
  • LincLinc Director of Development Detroit Vanilla Staff
    Don't change something if you don't have to
    Annoyingly realist to come to that conclusion, isn't it? :D

    Thanks for the debug, @Tim. I hadn't uploaded the new one yet.
  • It's 11pm and feels like it's been a long day. :) woke up for 9am lecture on deterministic finite automaton, never fun.
  • Is there a simple way for a beginner like me to block my users from hiding their on line status?
  • lucluc ✭✭
    @avantime4mike:

    I think you should comment out ProfileController_AfterAddSideMenu_Handler and ProfileController_Whosonline_Create functions in default.php.

    Or if you want minimal change, just comment out:
    $SideMenu->AddLink('Options', T('Who\'s Online Settings'), '/profile/whosonline', FALSE, array('class' => 'Popup'));
    It will not add the menu option, but be aware that the link will still be available to use as the second function will still be in the code.

    I greatly prefer the first option, and as an added bonus, it's faster as 2 functions are not parsed anymore :)


  • 18 months ago when I asked this question I didn't understand the reply. I now feel more confident about making changes but am struggling to find the lines or files mentioned above to comment out. This addon would be much more use to me if the list of active users gave a true report. Could someone expand a little on the above for someone like me who has a very basic understanding of how to implement changes. Thanks.

Sign In or Register to comment.