Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:entwickler:hooks [2026/08/26 21:14] – kainhoferen:entwickler:hooks [2026/08/31 00:08] (current) – kainhofer
Line 4: Line 4:
 For the full list of hooks, see the [[.:hooks:catalogue|Hooks Catalogue]].  For the full list of hooks, see the [[.:hooks:catalogue|Hooks Catalogue]]. 
  
-Note: The underlying plugin system that lets Admidio extend easily with third party plugins is not yet implemented. The hooks functionality described here, however, also works with manually added extensions in the admidio code tree.+Note: The hooks system described on this page is how your code can alter the inner workings of Admidio. To make use of it, you typically create a plugin to register and execute the callback function. See the page [[en:entwickler:plugin_development]] for an explanation how to develop an Admidio plugin.
  
 ===== What this is ===== ===== What this is =====
Line 10: Line 10:
 Admidio's hooks are a generic extension mechanism to allow plugins to react to core events or even  Admidio's hooks are a generic extension mechanism to allow plugins to react to core events or even 
 modify core Admidio behavior without patching core files or subclassing core classes: modify core Admidio behavior without patching core files or subclassing core classes:
-  * You register a callback function for any of the documented hookd +  * You register a callback function for any of the documented hooks 
-  * At several strategic spots in the code, Admidio core dispatches a named hoo, at that point+  * At several strategic spots in the code, Admidio core dispatches a named hook
   * Core calls all registered callback functions for the particular named hook.   * Core calls all registered callback functions for the particular named hook.
  
Line 146: Line 146:
     }     }
     // reject an email outside the association's domain     // reject an email outside the association's domain
-    if ($userData->getValue('usd_usf_id') === $emailFieldId && !str_ends_with($value, '@example.org')) {+    if ($userData->getValue('usf_name_intern') === 'EMAIL' && !str_ends_with($value, '@example.org')) {
         throw new Exception('Only @example.org addresses are allowed.');         throw new Exception('Only @example.org addresses are allowed.');
     }     }
  • en/entwickler/hooks.1787771657.txt.gz
  • Last modified: 2026/08/26 21:14
  • by kainhofer