Broken preferences in imp

Michael M Slusarz slusarz@bigworm.colorado.edu
Fri, 22 Mar 2002 20:36:15 -0700


I think this change 'broke' imp:

Registry.php - Last Log Message for rev 1.82:

- always create a prefs object, even if it's just default prefs.

The problem, as far as I can figure it out, is as follows:
1. Logging on to IMP calls redirect.php.
2. Since there is no current session, redirect.php calls IMP::createSession.
3. IMP::createSession does all the figuring out of who the current user is, 
etc.  However, because of revision 1.82, the preferences have already been 
created.  But, this preferences do not include ANY of the user information 
(since createSession is where this is figured out in the first place).  
Thus, when IMP::createSession calls registry->loadPrefs(), this doesn't 
include any of the user preferences (only the default values in the various 
prefs.php config files).

Thus, for example, if you try to access 'last_login', it will return 1 
(since that preference is set) instead of the user value (i.e. 104678594).  
This screws up the last login display (it says the last time i logged in 
was 12/1969).

This only affects this first loading of the redirect page.  Once a session 
has been established (i.e. all future loaded pages), preferences work fine.

hope this helps.  i don't know all that much about how the Horde libs 
actually work, so I didn't want to poke around there too much and try to 
submit a fix.

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder