Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter

[eluser]katanama[/eluser]
I got rid of the warning...

My controller for my login page is a class named Auth.

That could be one of the cause. Because when using that page, for sure the controller will be instantiated and within the controller itself the stdObject Auth will be attempted for instatiation.

However, another controller that load Flexi Auth, a controller class called Users, also have the same problem.


Solution :

I created a file named Auth.php inside /application/libraries
Content of that file is simply:

Code:
<?php

class Auth {}

and then inside my controllers constructor I have this :

Code:
// Load required CI libraries and helpers.
            $this->load->database();
            $this->load->library('session');
            $this->load->helper('url');
            $this->load->helper('form');

            // This is used as a global that is accessible via both models and both libraries, without it, flexi auth will not work.
            $this->load->library('auth');
            

            // Load 'standard' flexi auth library by default.
            $this->load->library('flexi_auth');

Simply load it using MX_Loader or CI_Loader (depends wether one uses HMVC) by using


Code:
$this->load->library('auth')

It's not pretty, but it does take the eyesore away.


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 12-13-2012, 02:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB