From: Vincent Zanotti Date: Tue, 22 Apr 2008 17:47:58 +0000 (+0200) Subject: Removes the GoogleApps account clean-up for dead people who did not had any. X-Git-Tag: xorg/0.9.16~18 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6c0bb86ee460c231b3d27a38c161bf1461c7ea2a;p=platal.git Removes the GoogleApps account clean-up for dead people who did not had any. Signed-off-by: Vincent Zanotti --- diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 8a53e76..45666bb 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -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(); + } } }