[commits] [Wiki] changed: CustomizingPreferencesH5

Wiki Guest wikiguest at horde.org
Thu Mar 6 08:48:21 UTC 2014


guest [194.95.66.21]  Thu, 06 Mar 2014 08:48:21 +0000

Modified page: http://wiki.horde.org/CustomizingPreferencesH5
New Revision:  4
Change log:  add description of hook example

@@ -58,6 +58,12 @@
   	}
      }
  }
  </code>
+
+Because the prefs_init hook is called each time an user logins, line  
12 shall prevent that the value is set to default each time, probably  
overwriting the user's choice. The empty string is the default value  
of the {{search_sources}}.
+
+Line 13 collects all address books from Turba, the user has access  
to. Line 14 prepares the string for the preference. These lines are  
very preference-specific.
+
+Line 15 and 16 permanently write the settings into the preference  
storage of the user. The next time the user logins, {{$value}} is no  
longer empty, hence, the {{if()}} block is skipped and any newly  
available address books are **not** automatically enabled. If you want  
to keep the preference unchanged once the user has change the setting  
manually, remove these two lines.





More information about the commits mailing list