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 - 04-06-2010

[eluser]owls[/eluser]
How much effort is involved to make it php 4 compatible? And thanks so much for your quick and helpful responses.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-06-2010

[eluser]Ben Edmunds[/eluser]
You would have to change the constructors and get rid of the method chaining in the model.

That would probably take awhile...


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-06-2010

[eluser]owls[/eluser]
Nuts! Okay, Ben, thanks so much for your help.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-06-2010

[eluser]spmckee[/eluser]
Big THANKS for this one Ben!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-07-2010

[eluser]joytopia[/eluser]
Ben,
it seems, that in some cases the ion_auth library is not loaded.

I put the following line into the model's constructor:

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

Now it works.

Best regards

Bernd


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-07-2010

[eluser]Ben Edmunds[/eluser]
Bernd,

Thanks for finding that man. I'll push that up.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-08-2010

[eluser]joytopia[/eluser]
Ben,

unfortunately the errors came back sometimes.
When I changed line 845 and chaged it back again, sometimes the error had gone.
Is it woodoo or just a new cookie? I don't know.

As I do not use extra_where, the possible reason may be, that extra_where is not set.

So I changed the critical lines in the model:

line 651:
Code:
if(isset($this->ion_auth->_extra_where)) $this->db->where($this->ion_auth->_extra_where);
        return $this->db->get($this->tables['users']);

line 844
Code:
if(isset($this->ion_auth->_extra_where)) $this->db->where($this->ion_auth->_extra_where);
        $this->db->update($this->tables['users'], array('last_login' => now()), array('id' => $id));

I will observe it and give you an info, if the errors have gone forever.

Best regards
Bernd


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-08-2010

[eluser]matula[/eluser]
Out of curiosity, I noticed the data is being sent to the View using "$this->data"... how is this different from just setting a "$data" array and passing that? Is it just a coding preference, performance difference, or maybe some new code practice that's coming in CI2?
Thanks!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-08-2010

[eluser]joytopia[/eluser]
matula,

$data only works inside a method,
$this->data works inside the whole class.

With $this->data you can put together your array over several methods.

Best regards
Bernd


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-08-2010

[eluser]Christian Gilbert[/eluser]
Hi there I've installed ionauth but i'm getting an error when I try to recover password:

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: libraries/Ion_auth.php

Line Number: 734

I downloaded the code from gittub