Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Ben Edmunds[/eluser]
Christian,

When you say recover password; which step were you on? What method was being called?


Thanks,

[eluser]Christian Gilbert[/eluser]
the controller is forgot_password there is an error in the Ion_auth library in line 734 the function is
public function messages()
{
$_output = '';
foreach ($this->messages as $message)
{
$_output .= $this->message_start_delimiter . $this->ci->lang->line($message) . $this->message_end_delimiter;
}

return $_output;
}

invoked by $this->session->set_flashdata('message', $this->ion_auth->messages()); in auth controller line 165

[eluser]Ben Edmunds[/eluser]
Christian,

It was because their is no default value for messages and errors.

I just pushed the fix for this to github.

[eluser]Christian Gilbert[/eluser]
it works but the flash message is empty and there is an error in rest_password:

Severity: Notice

Message: Undefined property: stdClass::$salt

Filename: libraries/Ion_auth.php

Line Number: 235

[eluser]Christian Gilbert[/eluser]
I fixed the error just add

$this->tables['users'].'.salt',

on file ion_auth_model.php between the lines 417 and 419.

[eluser]Ben Edmunds[/eluser]
Thanks Christian!

I just pushed that up to github.

[eluser]n0xie[/eluser]
I know the Controller for Ion_Auth is just some example code but I would like to point out that the way it is done now, the Controller is wide open to CSRF exploits, possibly disabling all your users. You might want to add a little check or add some documentation so that people are aware that the code is primarily meant as an example and should be validated if used in a real life site...

I added a patch for those interested.

Other then that, keep up the good work!

[eluser]Ben Edmunds[/eluser]
Thanks n0xie!

I've been hoping someone would expand on the example code and this is a good step in the right direction.

I'll test it and integrate it this weekend.



Thanks,

[eluser]matula[/eluser]
Thanks for the great work, and great code! I ran across this error earlier...
Code:
Message: Undefined property: Ion_auth_model::$ion_auth

Filename: models/ion_auth_model.php

Line Number: 845

and then this...
Code:
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 'id` = '5'' at line 1

UPDATE `users` SET `last_login` = 1270844033 WHERE ` IS NULL AND `id` = '5'
I had the login set to remember, and was away for a few hours. When I tried to get back to the login screen, this is what I got. Once I restarted Firefox it worked... so it seems to be something weird in the sessions, and the "_extra_where".

Just FYI...

[eluser]joytopia[/eluser]
Matula,

I had the same issue (see my posts in this threat).

Here my fixes 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));


Ben and Phil,
until now it works fine with these fixes.

Best regards
Bernd




Theme © iAndrew 2016 - Forum software by © MyBB