[solved] Hide Specific row from Grid

edited August 2017 in Modules
Actually want to hide super admins from users list.

Comments

  • edited 8:09AM
    I would say to overload the ./modules/fuel/models/fuel_users.php model with your own and add a where() call in the list_items() function - "super_admin <> 'yes'"
    Having said that, I think non super-users can't see super_users in v1.4 by default:
    public function list_items($limit = NULL, $offset = NULL, $col = 'email', $order = 'desc', $just_count = FALSE) { $CI =& get_instance(); $user = $CI->fuel->auth->user_data(); if (!$CI->fuel->auth->is_super_admin()) { $this->db->where(array('super_admin' => 'no')); } $this->db->select('id, email, user_name, first_name, last_name, super_admin, active'); $data = parent::list_items($limit, $offset, $col, $order, $just_count); return $data; }
  • edited 8:09AM
    Cool. Thanks. That was the plan B.
    As I was looking into http://docs.getfuelcms.com/modules/simple page for any Additional Configuration Parameters possible.
    No worries, will go with this. Thanks.
Sign In or Register to comment.