title: Codeigniter HMVC + ion_auth trouble loading the config items
body: <p>I have been banging my head for 5 hours and I finally solved the problem but I just cannot go to sleep without knowing the reason. Let me explain the issue first. </p>
  
  <p>I have used codeigniter HMVC extension and installed ion_auth as a separate module. </p>
  
  <pre><code>|-modules
  |--auth
  |---config
  |-----ion_auth.php
  |---controllers
  |-----auth.php
  |---models
  |-----ion_auth_model.php
  |---views
  </code></pre>
  
  <p>When I was trying to get a user's group I started to get wired SQL errors. Then I narrowed the issue and figured out that the items in <code>config/ion_auth.php</code> were not loaded in the <code>ion_auth_model.php</code> file. </p>
  
  <blockquote>
    <p>ERROR - 2016-02-24 20:09:26 --> Query error: You have an error in your
    SQL syntax; check the manual that corresponds to your MySQL server
    version for the right syntax to use near 'as <code>id</code>, .<code>name</code>,
    .<code>description</code> JOIN  ON .=.<code>id</code> WHERE . = '2'' at line 1 - Invalid
    query: SELECT . as <code>id</code>, .<code>name</code>, .<code>description</code> JOIN  ON .=.<code>id</code>
    WHERE . = '2'</p>
  </blockquote>
  
  <p>Then I tried couple of stuffs and when I remove the index <code>'ion_auth'</code> from 
  couple of method calls in <code>ion_auth_model.php</code> everything started to work. </p>
  
  <p>I changed </p>
  
  <pre><code>$this-&gt;tables  = $this-&gt;config-&gt;item('tables', 'ion_auth');
  $this-&gt;join            = $this-&gt;config-&gt;item('join', 'ion_auth);
  </code></pre>
  
  <p>to </p>
  
  <pre><code>$this-&gt;tables  = $this-&gt;config-&gt;item('tables');
  $this-&gt;join            = $this-&gt;config-&gt;item('join');
  </code></pre>
  
  <p>Can anyone tell me why it worked? </p>