Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Auth

[eluser]davidbehler[/eluser]
I haven't looked into the code for a while, but I guess that should work.

[eluser]Mat-Moo[/eluser]
I've had one minor issue (unless I'm missing something?) When I use E-Mail address as the Id/Login info I've a problem when the user needs to update it. Because once they change their email the session->user info is then incorrect. I added a small function :-
Code:
function change_identifier($newid="")
    {
        if ($newid=="")
        {
            return FALSE;
        }
        $this->CI->session->set_userdata('user', $newid);
        $this->get_user();
    }
Not pretty, but can be used to correctly keep the user logged in with the correct data. Or am I missing something?

[eluser]davidbehler[/eluser]
You are right, I will fix that.
But I guess it would be better to use the primary key colum of the user table as identifier in the session instead of the identifier column. That way you can change your username/email/whatever you use as identifier when and to whatever you want without having to worry about updating the session.

Any objections?

[eluser]Mat-Moo[/eluser]
None, just is more work Smile

[eluser]Mat-Moo[/eluser]
I've got a strange one - I'm using Remember me, and I added a debug line to verify that the session is being set with 60*60*24*365*2 - but I'm still need to login a couple of times a day on the site I'm working on. The only difference between my use on this site and another is that change the sess_match_useragent to false, as I'm using a java upload facility that messed around otherwise. Any ideas?

[eluser]davidbehler[/eluser]
Yeah...I always suspected that one doesn't work as it's supposed to ^^.

I had a deeper look at what actually went wrong and as far as I can tell I found a work around. The problem is, that with every page load the session class sets a new cookie/updates the current one and forgots about the expiration time that was set before. So I changed my auth class to take care of that part. Everytime the auth class is loaded, the cookie is updated again with the right expiration time according to the remember_me flag used on login.

Hope that solves your problem!

[eluser]Mat-Moo[/eluser]
Happy to test it out, project is still WIP anyway - Where can I grab new version?

[eluser]davidbehler[/eluser]
Same as the download link in my first post in this thread: http://davidbehler.de/download/auth.rar

[eluser]Mat-Moo[/eluser]
Ok, just as the first post has got 1.7 18/11-2008 I wrongly assumed you had not posted it Smile

Now, you REALLY should put your name/download/version! info in the Auth.php file Smile

[eluser]davidbehler[/eluser]
Yeah, you're right ^^
I will upload a new version with some infos like download, version, etc later today...maybe I will even start commenting my library Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB