I would like my super admin to be stealthy

tenants

Well-known member
When I log on to the forum with my super admin, I don't want any users to know that I'm there.

I would even like for users to not know the name of the super admin (so make it not visible from the users page)

Under users permissions in the ACP, I've selected Privacy > Show online status > False

But I can still see this user as 1) staff on line, and 2) users on line

Is there a way to make the super admin stealthy?
 
If you have "Show online status" unchecked then only members with the ability to view hidden members will see that account online.

There isn't an easy way to completely hide an individual account; you could try using conditionals in the various templates.
 
I think this should work hierarchically. If a super admin deselects "show online status", admins and mods shouldn't be able to see the super admin. If an admin deselects "show online status", super admin should see him but not moderators. If a moderator deselects it, admins and super admins should see him but not users.
 
You could edit the template, like: sidebar_online_users

Code:
<ol class="listInline">
<xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
<xen:if is="{$i} <= {$onlineUsers.limit}">
<li>
<xen:if is="{$user.user_id}">
<a href="{xen:link members, $user}"
class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
<xen:else />
{xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
</xen:if>
</li>
</xen:if>
</xen:foreach>
<xen:if is="{$onlineUsers.recordsUnseen}">
<li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
</xen:if>
</ol>

the line :
Code:
<xen:if is="{$user.user_id}">
Could perhaps be updated with "and is NOT the super admin userid .."

So when it's anybody else, it will show.

There are a few locations where users are listed, you'd have to catch them all.
 
try to extend session model and overwrite prepareSessionActivityConditions with

PHP:
public function prepareSessionActivityConditions(array $conditions, array &$fetchOptions)
    {
        $sqlConditions = array();
        $db = $this->_getDb();

        if (!empty($conditions['userLimit']))
        {
            switch ($conditions['userLimit'])
            {
                case 'registered': $sqlConditions[] = 'session_activity.user_id > 0'; break;
                case 'guest': $sqlConditions[] = 'session_activity.user_id = 0'; break;
            }
        }

        if (!empty($conditions['user_id']))
        {
            $sqlConditions[] = 'session_activity.user_id = ' . $db->quote($conditions['user_id']);
        }

        if (!empty($conditions['forceInclude']))
        {
            $forceIncludeClause = ' OR user.user_id = ' . $db->quote($conditions['forceInclude']);
        }
        else
        {
            $forceIncludeClause = '';
        }

        if (empty($conditions['getInvisible']))
        {
            $sqlConditions[] = 'user.visible = 1 OR session_activity.user_id = 0' . $forceIncludeClause;
            $this->addFetchOptionJoin($fetchOptions, self::FETCH_USER);
        }

        if (empty($conditions['getUnconfirmed']))
        {
            $sqlConditions[] = 'user.user_state = \'valid\' OR session_activity.user_id = 0' . $forceIncludeClause;
            $this->addFetchOptionJoin($fetchOptions, self::FETCH_USER);
        }

        if (!empty($conditions['cutOff']) && is_array($conditions['cutOff']))
        {
            list($operator, $cutOff) = $conditions['cutOff'];

            $this->assertValidCutOffOperator($operator);
            $sqlConditions[] = "session_activity.view_date $operator " . $db->quote($cutOff);
        }

$sqlConditions[] = "user.user_id !=  your_id" ; // new line
      return $this->getConditionsForClause($sqlConditions);
    }[(php]
 
Top Bottom