Hooks must be implemented in modules, not in themes. For that, choose a name (e.g. example
), create a directory by that name in sites/all/modules
, create the example.info
file with content
name = Example
description = Does some fancy stuff in certain situations
core = 7.x
in that directory and put your function in sites/all/modules/example/example.module
. You also have to rename your function to example_user_update
.
Further reading:
- Writing module .info files (Drupal 7.x)
- Understanding the hook system for Drupal modules
module_invoke_all
, the function that is used to invoke hook implementations.