Removes the GoogleApps account clean-up for dead people who did not had any.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Tue, 22 Apr 2008 17:47:58 +0000 (19:47 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Tue, 22 Apr 2008 17:47:58 +0000 (19:47 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
include/user.func.inc.php

index 8a53e76..45666bb 100644 (file)
@@ -74,8 +74,10 @@ function user_clear_all_subs($user_id, $really_del=true)
     // Deactivates, when available, the Google Apps account of the user.
     if ($globals->mailstorage->googleapps_domain) {
         require_once 'googleapps.inc.php';
-        $account = new GoogleAppsAccount($uid, $alias);
-        $account->suspend();
+        if (GoogleAppsAccount::account_status($uid)) {
+            $account = new GoogleAppsAccount($uid, $alias);
+            $account->suspend();
+        }
     }
 }