Re: LiveUser - lastLogin update, Automatic?

From: Date: Fri, 07 Apr 2006 22:18:37 +0000
Subject: Re: LiveUser - lastLogin update, Automatic?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23586@lists.php.net to get a copy of this message
Hector Partidas wrote:
I've been playing around with liveuser some more today, and i've been reading the examples that come with the bundle (when i mean reading, i meant the code), and was wondering if the lastlogin value is updated automatically (which it seems like because i can't find a method or any line that updates it) or is it set externally? on the example4 that is brought with the bundle, lastlogin gets updated, while on the example i have doesn't and the code is just about the same:
yes the field is updated automatically on every init() call if its defined in the config array. however there is a bug due to a change in the config layout that results in things not working if lastlogin is set to null in the config array (which is the proper thing to allow NULL in the column for users who never logged in yet). its fixed in CVS .. the change required is in the auth container _updateUserData() function it needs to use array_key_exists instead of isset() if (!array_key_exists('lastlogin', $this->tables['users']['fields'])) {
    return true;
} regards, Lukas

« previous php.pear.general (#23586) next »