Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Wayne Smallman[/eluser]
OK, thanks to Ben Edmonds, I've now got CodeIgniter Reactor, Ion Auth and Modular Extensions working.

What I must stress is, having spent some time searching various threads on this subject, Ben made changes to my clean install of the aforementioned that I have not been able to find documented elsewhere — irrespective of what other users may have claimed previously, this is not as straight forward as has been suggested.

So if you were stuck on the same way I was, the following might just be the definitive solution for you as it has been for myself.

Here is a series of instructions, based on earlier instructions, which I've amended to make more accurate, to help clarify certain instructions, and to include the additions made by Ben:

1. Download the latest version of CodeIgniter.

2. Extract, and then make sure it is running, by configuring the: "application/config/config.php" file.

3. Download the latest version of Modular Extension

4. Install and copy MY_Loader & MY_Router to "application/core", and the "MX" directory to "application/third_party" directory.

5. Download the latest version of Ion_Auth.

6. Install the SQL.

7. Place the entire "auth" directory itself into the "modules" directory as-is.

8. Add a route into "application/config/routes.php":
Code:
$route['auth/(.*)'] = 'users/auth/$1';

9. Add auto-load items to the "application/config/autoload.php" file:
Code:
$autoload['libraries'] = array('database','session');

10. Edit the following paths in the: "application/modules/auth/libraries/Ion_auth.php" file:
Code:
$this->ci->load->config('auth/ion_auth', TRUE);
$this->ci->load->library('email');
$this->ci->load->library('session');
$this->ci->lang->load('auth/ion_auth');
$this->ci->load->model('auth/ion_auth_model');

11. Changed the "application/modules/auth/controllers/auth.php" controller to extend "application/core/MY_Controller.php" library, which in turn extends the "application/third_party/Controller.php" MX_Controller file.

12. Edit your MY_Controller file to reflect the following:
Code:
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

/* load the MX_Router class */
require APPPATH."third_party/MX/Controller.php";

class MY_Controller extends MX_Controller
{
    function __construct()
    {
        parent::__construct();
        
        $this->load->database();
        $this->load->library('session');
        $this->load->library('form_validation');
        $this->load->helper('url');
        $this->load->library('auth/ion_auth');
    }
}

You may change the name of the "auth" directory, but be sure to reflect this name change in points 8, 10 and 12.

If you spot any mistakes in the above, please let me know and I'll make the required changes.

Hopefully, you're good to go!


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 03-10-2011, 07:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB