Welcome Guest, Not a member yet? Register   Sign In
HMVC, i18n and Simple Templating System, but Redux Auth Library Problem
#1

[eluser]nizsmo[/eluser]
Hi All,

Just want to ask the experts here a small question Smile
I have currently set-up the following in my codeigniter installation:

http://maestric.com/en/doc/php/codeigniter_i18n

http://maestric.com/en/doc/php/codeigniter_template

http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/

And all these work perfectly off course with some customizations. Then yesterday I wanted to setup redux auth library:
http://code.google.com/p/reduxauth/

And everything seems to work all ok except one little thing which bugs me. In any of the modules (take the user module for example) we have a call to a simple function in the reduxauth library:
Code:
$redux = $this->redux_auth->login
            (
                $this->input->post('email'),
                $this->input->post('password')
            );

which is simply to verify if the user is properly logged in. However, I keep getting the error:

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Login::$redux_auth

Filename: controllers/login.php

Line Number: 26


Fatal error: Call to a member function login() on a non-object....

I have checked and the redux_auth library auto-loads fine in my autoload.php under my config directory, so I am stumbled as to why this is happening.

There is an easy fix, something like this will fix it:
Code:
$CI =& get_instance();
$redux = $CI->redux_auth->login
            (
                $this->input->post('email'),
                $this->input->post('password')
            );

however, I don't really want to go down this path for 2 main reasons:
1. Its one extra (and probably unnecessary) step
2. I don't know the cause, and in my opinion that's not good, as I want to find out exactly why the above is happening.

Interesting things to note:
1. In the exact same file, the line $this->validation->run() runs perfectly without any problems. The validation library is also loaded in the autoload file under the config directory.
2. I suspect (not sure at all) that it is something to do with the HMVC, and loading libraries, but cannot be totally sure.

Any help would be greatly appreciated, many thanks in advance!!! Smile Smile

Joe


Messages In This Thread
HMVC, i18n and Simple Templating System, but Redux Auth Library Problem - by El Forum - 09-29-2008, 02:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB