How to hide admin profile from members list?

Is it possible not to have the admin profile on the members list?


  • You would need to filter them out from the query in the members controller.
  • What exactly does one has to write in there or how?
  • Damian can you please guide me on this!
  • Hello

    I was told to use this: $excluded_user ='1'; where on member controller should I place this?
  • Can some one please reply to this!
  • In /cc-core/controllers/members.php on line 14 change it so that it looks like this:

    $query = "SELECT user_id FROM " . DB_PREFIX . "users WHERE status = 'Active' AND role = 'user'";

    Please be aware that because you are modifying core files, your changes will be lost during updates. Please see our plugin guide in our documentation for how to build plugins.
  • Hello

    It does hide the admin but then it brakes the sequence layout, please see screen shoot

    My code looks like this:

    // Retrieve total count
    $db = Registry::get('db');
    $query = "SELECT user_id FROM " . DB_PREFIX . "users WHERE status = 'Active'";
    $query = "SELECT user_id FROM " . DB_PREFIX . "users WHERE status = 'Active' AND role = 'user'";
    $total = $db->rowCount();

    618 x 754 - 64K
Sign In or Register to comment.