anchor.diff:          mnesia:delete({private_email, {User, Server}})
       end,
       mnesia:transaction(F).
  +
  +%
  +% User events
  +%
  +
  +user_removed(User, Server) ->
  +    JID = jlib:make_jid(User, Server, ""),
  +    delete_email(JID).
  +
  +user_registered(User, Server) ->
  +    % Clear previous entry, if one exists
  +    user_removed(User, Server).
   
   %
   % Ad-Hoc commands
  
positive.code:         get_email/1,
          delete_email/1,
  
          % Ad-hoc commands
          private_email_items/4,
          private_email_commands/4
  
negative.code: 
      update_table(),
  
      % user event hooks
      ejabberd_hooks:add(remove_user, Host, ?MODULE, user_removed, 50),
      ejabberd_hooks:add(register_user, Host, ?MODULE, user_registered, 50),
  
      % ad-hoc hooks
      ejabberd_hooks:add(adhoc_local_items, Host,
                         ?MODULE, private_email_items, 50),
      ejabberd_hooks:add(adhoc_local_commands, Host,
  