[Tickets #3895] Auth::get... in hooks
bugs@bugs.horde.org
bugs at bugs.horde.org
Thu May 11 06:35:19 PDT 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=3895
-----------------------------------------------------------------------
Ticket | 3895
Updated By | adrieder at sbox.tugraz.at
Summary | Auth::get... in hooks
Queue | Horde Base
Version | HEAD
State | Assigned
Priority | 3. High
Type | Bug
Owners | Jan Schneider
-----------------------------------------------------------------------
adrieder at sbox.tugraz.at (2006-05-11 06:35) wrote:
If I read the code right, they are called when the registry function
loadPrefs() is used. It gets the preferences via $prefs->retrieve(). This
retrieve() function uses the private method _callHooks() from the Prefs
class.
Now there is one place in imp/login.php where loadPrefs() is called when the
Auth object is cleared. This is when a user logs out (see imp/login line 92
and 93). I don't know the exact reason why it is called, but anyway at this
point the Auth::get...() methods in th hook doesn't work.
It is also called via Auth::clearAuth() in which again the auth info from
the Auth object is already removed before the loadPrefs call.
Auth::clearAuth() is also called in imp/login.php when a user logs out.
Therefore the hooks are called twice on a logout and I get also the errors
twice.
I didn't figure out what happens when a user logs in (authentication is
done by IMP), but there it also seams to be the case that the hooks are
called to early or are not recalled again.
More information about the bugs
mailing list