Updates the Google Apps account status on suspend, to prevent email redirections...
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 22 Mar 2008 15:21:38 +0000 (16:21 +0100)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 22 Mar 2008 15:21:54 +0000 (16:21 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
include/googleapps.inc.php

index f893fcd..dadbf03 100644 (file)
@@ -319,6 +319,11 @@ class GoogleAppsAccount
         if (!$this->pending_update_suspension) {
             $this->create_queue_job('u_update', array('suspended' => true));
             $this->pending_update_suspension = true;
+            XDB::execute(
+                "UPDATE  gapps_accounts
+                    SET  g_status = 'disabled'
+                  WHERE  g_account_name = {?} AND g_status = 'active'",
+                $this->g_account_name);
         }
     }