CodeIgniter Forums
Ion Auth - Lightweight Auth System based on Redux Auth 2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Ion Auth - Lightweight Auth System based on Redux Auth 2 (/showthread.php?tid=27435)



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-01-2011

[eluser]Ben Edmunds[/eluser]
Post the Ion Auth library constructor, after you changed the paths. And a screenshot of your directory structure.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-01-2011

[eluser]Wayne Smallman[/eluser]
[quote author="Ben Edmunds" date="1299031750"]Post the Ion Auth library constructor, after you changed the paths. And a screenshot of your directory structure.[/quote]I've attached a screen shot to my previous post, but I've had to shrink the whole thing, because of the attachment size limitations.

Here's the constructor for your library file:

Code:
public function __construct() {
        $this->CI =& get_instance();
        $this->CI->load->config('users/ion_auth', TRUE);
        $this->CI->load->library('email');
        $this->CI->load->library('session');
        $this->CI->lang->load('users/ion_auth');
        $this->CI->load->model('users/ion_auth_model');
        $this->CI->load->helper('cookie');

        $this->messages = array();
        $this->errors = array();
        $this->message_start_delimiter = $this->CI->config->item('message_start_delimiter', 'ion_auth');
        $this->message_end_delimiter   = $this->CI->config->item('message_end_delimiter', 'ion_auth');
        $this->error_start_delimiter   = $this->CI->config->item('error_start_delimiter', 'ion_auth');
        $this->error_end_delimiter     = $this->CI->config->item('error_end_delimiter', 'ion_auth');

        //auto-login the user if they are remembered
        if (!$this->logged_in() && get_cookie('identity') && get_cookie('remember_code'))
        {
            $this->CI->ion_auth_model->login_remembered_user();
        }
    }



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-03-2011

[eluser]Wayne Smallman[/eluser]
Hi Ben, any thoughts on the details I've given you in the previous two posts?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-03-2011

[eluser]Zawardo[/eluser]
I have troubles using authentication in postgre and keeping the user tables into a schema (not public):

Code:
$config['tables']['groups']  = 'provincia.webapp_groups';
    $config['tables']['users']   = 'provincia.webapp_users';
    $config['tables']['meta']    = 'provincia.webapp_meta';

when i try lo login i call the get_users methond from the model

Code:
public function get_users($group=false, $limit=NULL, $offset=NULL)
    {
        $this->db->select(array(
                $this->tables['users'].'.*',
                $this->tables['groups'].'.name AS '. $this->db->protect_identifiers('group'),
                $this->tables['groups'].'.description AS '. $this->db->protect_identifiers('group_description')
                   ));
.
.
.

but the first table is mis-escaped:

Code:
ERROR: syntax error at or near "".*, "" LINE 1: SELECT "provincia".webapp_users".*, "provincia"."webapp_grou... ^

SELECT "provincia".webapp_users".*, "provincia"."webapp_groups"."name" AS "group", "provincia"."webapp_groups"."description" AS "group_description", "provincia"."webapp_meta"."first_name", "provincia"."webapp_meta"."last_name", "provincia"."webapp_meta"."company", "provincia"."webapp_meta"."phone" FROM "provincia"."webapp_users" LEFT JOIN "provincia"."webapp_meta" ON "provincia"."webapp_users"."id" = "provincia"."webapp_meta"."user_id" LEFT JOIN "provincia"."webapp_groups" ON "provincia"."webapp_users"."group_id" = "provincia"."webapp_groups"."id" WHERE "provincia"."webapp_users"."id" = '1' LIMIT 1

as you can see the first istance of the user table is: "provincia".webapp_users", missing a double quote. The next occurencies do not have the problem.

I'm unable to solve this myself (i started codeigniter yesterday), can you help me?

Thank you!!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-06-2011

[eluser]Edmundas KondraĊĦovas[/eluser]
Hi there,

very neat Auth system. However, I noticed that you cannot change the name of the library when it's being loaded.

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

You can't do that due to requests to the library itself from the model (I specifically got some errors with $_extra_where variable, which is located in the library, but is being called by the model in numerous places).

This is not a major problem by any means, but I thought I should report this.

With regards,
Edmundas


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-06-2011

[eluser]RJ[/eluser]
@Wayne - did you get that figured out? I'm having the same problem with Reactor/Ion/ME.

The configuration file development/users/ion_auth.php and users/ion_auth.php do not exist.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-07-2011

[eluser]Wayne Smallman[/eluser]
[quote author="bullspit" date="1299472782"]@Wayne - did you get that figured out?[/quote]

No, I'm still awaiting a response from Ben.

I've looked at some of the example projects that people have suggested, but I just cannot make any sense of them, such is the dense structure of their layout and the extremely complex interlinking going on.

All very, very frustrating.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-07-2011

[eluser]wiredesignz[/eluser]
I have just run the Ion_Auth application with Modular Extensions HMVC successfully.

Create a module named "auth" add the entire Ion_Auth application into the module. Move all of the views from the modules/auth/views/auth sub-directory up one level into modules/auth/views.

Call the application URL, http://domain.tld/index.php/auth and then login.

It works fine.

EDIT:
Removed the word "demo" to reduce ambiguity.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-07-2011

[eluser]Wayne Smallman[/eluser]
[quote author="wiredesignz" date="1299523171"]I have just run the Ion_Auth demo with Modular Extensions HMVC successfully.

Create a module named "auth" add the entire Ion_Auth demo application into the module. Move all of the views from the modules/auth/views/auth sub-directory up one level into modules/auth/views.

Call the application URL, http://domain.tld/index.php/auth and then login.

It works fine.[/quote]What demo application are you referring to, or do you mean the actual Ion Auth download?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-07-2011

[eluser]wiredesignz[/eluser]
Yes the application that is in the Ion_Auth download.