How can I integrate ion_auth library with CodeIgniter 3 HMVC?

I used ion_auth before in my project and I have no problem with that. Now I have a project that has an HMVC approach.

Here’s what i did in my setup.

  1. I download ion_auth
  2. I put the ion_auth folder in my module and load the sql
  3. I auth load the ion_auth in my config
    • $autoload[‘libraries’] = array(‘session’, ‘auth/Ion_auth’, ‘acl’);
  4. I modify the load config in the ion_auth library

    $this->load->config('auth/ion_auth', TRUE);
    $this->load->helper(array('cookie', 'language','url'));

And when I load ion_auth in my brower it says,

Unable to load the requested class: Ion_auth

And also I autoload the library in the Auth controller

<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Auth extends MX_Controller {

    public $autoload = array(
        'libraries' => array(
            'auth/Ion_auth', 'form_validation', 'acl'
        'helper' => array(
            'url', 'language'

    function __construct()


        $this->form_validation->set_error_delimiters($this->config->item('error_start_delimiter', 'ion_auth'), $this->config->item('error_end_delimiter', 'ion_auth'));


But still same error.

I don’t know what part I missed. Can you help me?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s