[Tickets #2838] NEW: hordes last_login preference not stored

bugs@bugs.horde.org bugs at bugs.horde.org
Tue Oct 25 07:38:05 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=2838
-----------------------------------------------------------------------
 Ticket             | 2838
 Created By         | heinz at htl-steyr.ac.at
 Summary            | hordes last_login preference not stored 
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


heinz at htl-steyr.ac.at (2005-10-25 07:38) wrote:

Background:
I'm using the Horde-Framwork with imp and ingo.
In the Horde configuration I have choosen (Authentication):
  Let a Horde application handle authentication: imp

The preferencies backend is LDAP.



When I'm including ingo in imp then the last_login preference from Horde is
not stored in the preferencies-backend!

Reason:
- When imp comes up the preferencies are retrieved  (Horde and IMP prefs) 
  The old value for last_login is retrieved
- horde/lib/Horde/Auth.php sets the new value for last_login
- Then Ingo retrieves the preferencies (ingo is used in imp)
  The preferencies from HORDE and INGO are retrieved
- At this time the HORDE-Prefs are retrieved a second time and the previous
set last_login attribute is overwritten!
- After this the HORDE-preferencies are stored back to LDAP the first time
in this session.

Resolution:
Store the new "dirty-value" for last_login after setting it:

Code snippet from horde/lib/Horde/Auth.php:
(Last line added)

     // Set the user's last_login information.
     $last_login = array('time' => time(),
                                   'host' =>
@gethostbyaddr($_SERVER['REMOTE_ADDR']));
     $GLOBALS['prefs']->setValue('last_login', serialize($last_login));
     //NEW: ************************Store it ! *********************
     $GLOBALS['prefs']->store();
     //END NEW ************************




More information about the bugs mailing list