Summary | Prefs overwrites modified Horde prefs in some cases |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | Horde Developers (at) , chuck (at) horde (dot) org |
Requester | heinz (at) htl-steyr (dot) ac (dot) at |
Created | 10/25/2005 (7206 days ago) |
Due | |
Updated | 11/23/2006 (6812 days ago) |
Assigned | 04/09/2006 (7040 days ago) |
Resolved | 11/23/2006 (6812 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
http://lists.horde.org/archives/cvs/Week-of-Mon-20061120/063224.html
However there was a lot of code changed, so please feel free to
re-open this. I'm just closing it so it doesn't get lost sitting in
feedback.
Summary ⇒ Prefs overwrites modified Horde prefs in some cases
Summary ⇒ LDAP prefs driver overwrites modified Horde prefs in some cases
"I use ldap backend for preferences.
In horde+imp last_login works.
In horde+imp+ingo last_login does not work anymore.
When imp loads preferences, it load horde preferences as well.
In that step it set last_login with the ldap value,
"display" last_login value
and set last_login to current time.
When ingo loads preferences, it load horde preferences as well.
In that step it set last_login with the ldap value and the
last_login value from imp is lost."
"I think this is actually a general flaw in the Prefs code, in that it
will load Horde preferences regardless of whether they're already
loaded. This is a waste and also, as you diagnosed, can result in
overwriting unwritten values.
I'm still puzzling out the best fix; your way does work, but I think
we'll arrive at something a bit different eventually. Needs to be
fixed for at least the SQL driver as well, possibly more."
Bug 3390has a better description of what goes on here, though - andcalling store() explicitly is not the correct solution.
State ⇒ Assigned
Bug #2829which was bothmarked bogus and provided the solution to your problem.
BUG #2829The reply was given as "last_login is not an IMP preference. You probably upgraded from an IMP
3 version and didn't follow the upgrade instructions."
This was a **NEW** and fresh installation ! Therefore the allocated
state "bogus" is incorrect. Also the Solution is definitely not
applicable. Would request the team to look at this problem again .
The full details are explained in bug
# 2829, we would like to pointout that the <<last_login>> is also a horde framework pref and not an
Imp as implied by the response.
State ⇒ Not A Bug
Bug #2829which was bothmarked bogus and provided the solution to your problem.
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ hordes last_login preference not stored
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
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 ************************