[cvs] [Wiki] changed: LdapPref

Wiki Guest wikiguest at horde.org
Mon Jun 19 08:26:38 PDT 2006


guest [82.233.234.109]  Mon, 19 Jun 2006 08:26:38 -0700

Modified page: http://wiki.horde.org/LdapPref
New Revision:  1.1
Change log:  Add coment

@@ -16,8 +16,14 @@
 
 2- Configuring horde
 Horde config/prefs.php
 Set pref hooks to true
+
+ *    hook: Call a hook function for the value of this preference
+ *             true:  Will call the function _prefs_hook_<prefname>
+ *                    to fill in the value of this preference.
+ *                    See hooks.php for more details.
+ *            false:  Normal behaviour - no hook is called.
 
 // user full name for From: line
 // If you lock this preference, you must specify a value or a hook for it in
 // horde/config/hooks.php.
@@ -40,8 +46,29 @@
     'desc' =>  _("Your From: address:")
 );
 
 Horde config/hooks.php
+ * NOTE 1: Having a hook function in this file does NOT mean that the hook
+ * will automatically be used. YOU MUST enable the hook. For preferences, set
+ * 'hook' => true in that preferences attributes; for other hooks, there will
+ * be a configuration option in each application's conf.php file such as
+ * $conf['hooks']['hookname'] which must be set to true.
+ *
+ * NOTE 2: Preferences hooks are ONLY executed on login. Preferences are
+ * cached during a users session and, to avoid unnecessary overhead every time
+ * a preference is accessed, the results of hooks are cached as well. This
+ * leads to ...
+ *
+ * NOTE 3: Any preference that is NOT LOCKED, that is set by a hook, WILL BE
+ * SAVED WITH THAT VALUE. This means several things:
+ * 1) Users will get the results of the hook set for them in their
+ *    preferences.
+ * 2) By virtue of this, the next time they log in and load their
+ *    preferences, the hook will NOT be called, because in their last session,
+ *    we saved the results of the hook for them. However, if the preference is
+ *    locked, the result of the hook will never be saved.
+
+
 Uncomment and configure the hook you active
 _prefs_hook_fullname
 _prefs_hook_from_addr
 


More information about the cvs mailing list