title: Not allowing access to home page when have correct role id
body: <p>When my maintenance mode is on. </p>
  
  <p>I would like to be able to still view the home page when maintenance mode is on. </p>
  
  <p><strong>But only if the member session role_id = 1</strong></p>
  
  <p>Currently does not let me view the home page at all even though my session <code>role_id == 1</code> keeps redirecting to maintenance page</p>
  
  <blockquote>
    <p>Question: How can I make sure can view home page if maintenance mode is active but if session <code>role id == '1'</code></p>
  </blockquote>
  
  <pre><code>public function maintenance_mode() {
  
      $maintenance_mode = $this-&gt;is_maintenance();
  
      if ($maintenance_mode) {
  
          if ($this-&gt;session-&gt;userdata('role_id') == '1') {
              return true;
          } else {
              $route = $this-&gt;uri-&gt;segment(1) .'/'. $this-&gt;uri-&gt;segment(2);
  
              $ignore = array('common/maintenance');
  
              if (!in_array($route, $ignore)) {
                  redirect(base_url('common/maintenance'));
              }
          }
      } 
  }
  
  public function is_maintenance() {
      $query = $this-&gt;db-&gt;where('item', 'maintenance_mode')-&gt;get('settings')-&gt;row('value');
      return $query;
  }
  </code></pre>