ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Ion Auth - Lightweight Auth System based on Redux Auth 2

February 10, 2010 7:00pm

Subscribe [287]
  • #196 / Apr 14, 2010 5:10pm

    Ben Edmunds

    812 posts

    They should land on reset_password/code, be redirected to login with a message that their new password was emailed to them, and then receive an email with their new password.

  • #197 / Apr 14, 2010 5:20pm

    jonathonmorgan

    2 posts

    Thanks for the help Ben! I’ll work through the controller with that in mind and see if I can figure out where the misdirect is.

  • #198 / Apr 15, 2010 9:18am

    mayk

    1 posts

    Hi Ben,

    I am trying out Ion Auth for the first time for my latest project. After downloading the latest source code from GitHub and copied all the files in the suggested folders, I could not open /auth/ page.

    After debugging controller/auth.php, I managed to find the problem. On line 286 should:
    $this->data[‘message’] = (validation_errors()) ? ($this->ion_auth->errors()) ? $this->ion_auth->errors() : validation_errors() : $this->session->flashdata(‘message’);

    Before it was: validation_errors()) – extra closing bracket.

    Thanks btw for this great plugin.

  • #199 / Apr 15, 2010 10:21am

    Ben Edmunds

    812 posts

    Thanks Mayk!

    That’s what I get for making changes directly on github without testing…

  • #200 / Apr 19, 2010 8:31am

    d3ptzz

    2 posts

    thanks for this great plugin.. 😊

  • #201 / Apr 19, 2010 10:37am

    Ben Edmunds

    812 posts

    d3ptzz,

    Your welcome 😉

  • #202 / Apr 19, 2010 7:25pm

    Kinsbane

    67 posts

    Hey Ben,

    I just upgraded my files to your latest gits and am receiving an error when trying to login with the default account - it appears to be in the function identity_check() within ion_auth_model.php, on or around line #332 here’s what my error says:

    A Database Error Occurred

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `0` = ‘[email protected]’’ at line 2

    SELECT COUNT(*) AS `numrows` WHERE `0` = ‘[email protected]

    Here’s the function:

    protected function identity_check($identity = '')
        {
            if (empty($identity))
            {
                return FALSE;
            }
    
            return $this->db
                ->where($this->identity_column, $identity)
                ->count_all_results($this->tables['users']) > 0;
        }

    I’ve got my newest ion_auth config file setup how I need, but not sure why it’s querying field `0` for the email.

    Any ideas that could help out? Thanks.

  • #203 / Apr 20, 2010 11:29am

    owls

    7 posts

    Other than form_validation, are there any major obstacles to using ion auth with codeigniter 1.6.2?

  • #204 / Apr 20, 2010 11:32am

    Ben Edmunds

    812 posts

    Owls,

    I have no idea, other than form_validation I don’t remember any big changes… 

    Give it a go and I’ll help you if you run into problems.

  • #205 / Apr 20, 2010 11:36am

    Ben Edmunds

    812 posts

    Kisbane,

    Try replacing $this->identity_column with $this->config->item(‘identity’, ‘ion_auth’) and let me know what happens.


    Thanks,

  • #206 / Apr 20, 2010 2:10pm

    Rob B.

    2 posts

    Hi—Thanks for the great library. Just wanted to let you know that I ran into the same problem Bernd discussed in this reply (http://ellislab.com/forums/viewreply/733952/) about the $this->ion_auth->_extra_where problem in the Ion auth model. I ended up commenting out line 899 (in the login_remembered_user() function) in ion_auth_model.php as follows:

    //get the user
            $query = $this->db->select($this->identity_column.', id, group_id')
                ->where($this->identity_column, get_cookie('identity'))
                ->where('remember_code', get_cookie('remember_code'))
                // ->where($this->ion_auth->_extra_where)
                ->limit(1)
                ->get($this->tables['users']);

    and that enabled CI to run properly. I’m not really sure I understand what this property is for (I did read through the definition in the library, but it’s still not that clear to me). Perhaps this could be a config variable that could be turned off if not needed. Anyway, I just wanted to post this as another case of this issue in the case it is helpful to you. Thanks!

    Rob

  • #207 / Apr 20, 2010 2:53pm

    Ben Edmunds

    812 posts

    Hey Rob,

    Thanks.  I just pushed a fix for this.  There seems to be a problem with the extra_where only when ran in the constructor of the library.  I haven’t been able to re-produce this issue to give it a good once over but from Bernd’s troubleshooting this is the fix he came up with and should work fine.

    The extra_where is there for multiple domain systems and any other system where users might need to have the same identity but need separate accounts.

  • #208 / Apr 20, 2010 3:19pm

    Kinsbane

    67 posts

    Kisbane,

    Try replacing $this->identity_column with $this->config->item(‘identity’, ‘ion_auth’) and let me know what happens.


    Thanks,

    Hey Ben,

    Well my first thought was, “I hadn’t upgraded CI since I did Ion Auth”, so I upgraded CI to 1.7.2 - but that was no fix. Changing from $this->identity_column to $this->config->item(‘identity’, ‘ion_auth’) also didn’t seem to work.

    So then I thought, “OK! I’ll just use ->where(‘email’, $identity) !!”
    But, this doesn’t work either:

    A Database Error Occurred

    Error Number: 1064

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `email` = ‘[email protected]’’ at line 2

    SELECT COUNT(*) AS `numrows` WHERE `email` = ‘[email protected]

    Something fishy is going on here. :/

  • #209 / Apr 20, 2010 4:04pm

    spmckee

    56 posts

    Same exact error as Kinsbane.

    Worked fine on localhost:
    PHP Version 5.2.9
    MySQL client version: 5.0.51a

    1064 error on dev server:
    PHP Version 5.2.6
    MySQL client version: 5.0.45

  • #210 / Apr 20, 2010 4:09pm

    Kinsbane

    67 posts

    I just realized that the AR commands in here aren’t selecting a table to select from whatsoever:

    return $this->db->get_where('users', array('email' => $identity), 1, 0);

    Outputs this error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `0` = ‘[email protected]’ AND `active` = 1 LIMIT 1’ at line 2

    SELECT `id`, `password`, `group_id` WHERE `0` = ‘[email protected]’ AND `active` = 1 LIMIT 1

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases