From 0546a53bb6ee58671ac1b90db5e354b402625bc0 Mon Sep 17 00:00:00 2001
From: Pedro Cambra <pedro.cambra@gmail.com>
Date: Wed, 2 Jul 2014 14:29:18 +0100
Subject: [PATCH] Issue #2296491 by pcambra: Delete role expire data in
 hook_user_delete.

---
 role_expire.module | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/role_expire.module b/role_expire.module
index 4557f39..5f1d3ad 100644
--- a/role_expire.module
+++ b/role_expire.module
@@ -360,6 +360,14 @@ function role_expire_user_cancel($edit, $account, $method) {
 }
 
 /**
+ * Implements hook_user_delete().
+ */
+function role_expire_user_delete($account) {
+  // Delete user records.
+  role_expire_delete_user_records($account->uid);
+}
+
+/**
  * Implements hook_user_load().
  */
 function role_expire_user_load($users) {
@@ -369,7 +377,7 @@ function role_expire_user_load($users) {
   /**
    * Load the starter roles into a static cache so it is easy to
    * see what has changed later on.
-   * 
+   *
    * TODO. Support multiple users that are being loaded here. Not sure yet
    * what that means for Role Expire 7.
    */
-- 
1.9.0

