Merge commit 'origin/platal-0.10.0'
[platal.git] / include / googleapps.inc.php
index 45337d4..71853c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -35,7 +35,7 @@ function post_queue_u_create($job) {
     $account = new GoogleAppsAccount($user);
     if ($account->activate_mail_redirection) {
         require_once('emails.inc.php');
-        $storage = new EmailStorage($user->id(), 'googleapps');
+        $storage = new EmailStorage($user, 'googleapps');
         $storage->activate();
     }
 
@@ -74,7 +74,7 @@ function post_queue_u_update($job) {
         if ($account->active()) {
             // Re-adds the email redirection (if the user did request it).
             if ($account->activate_mail_redirection) {
-                $storage = new EmailStorage($user->id, 'googleapps');
+                $storage = new EmailStorage($user, 'googleapps');
                 $storage->activate();
             }
 
@@ -101,7 +101,7 @@ function post_queue_u_update($job) {
 // TODO(vincent.zanotti): add the url of gappsd, when available.
 class GoogleAppsAccount
 {
-    // User identification: user id, and forlife.
+    // User identification: user id, and hruid.
     private $user;
     public $g_account_name;
 
@@ -336,7 +336,7 @@ class GoogleAppsAccount
 
         if (!$this->pending_update_suspension && !$this->pending_validation_unsuspend) {
             require_once('validations.inc.php');
-            $unsuspend = new GoogleAppsUnsuspendReq($this->user->id());
+            $unsuspend = new GoogleAppsUnsuspendReq($this->user);
             $unsuspend->submit();
             $this->pending_validation_unsuspend = true;
         }