Fixes "googleapps administrator" status determination.
[platal.git] / include / googleapps.inc.php
index e6cd099..6dae3b1 100644 (file)
@@ -37,7 +37,7 @@ function post_queue_u_create($job) {
     if ($account->activate_mail_redirection) {
         require_once('emails.inc.php');
         $storage = new EmailStorage($userid, 'googleapps');
-        $storage->enable();
+        $storage->activate();
     }
 
     // Sends the 'account created' email to the user, with basic documentation.
@@ -79,7 +79,7 @@ function post_queue_u_update($job) {
             // Re-adds the email redirection (if the user did request it).
             if ($account->activate_mail_redirection) {
                 $storage = new EmailStorage($userid, 'googleapps');
-                $storage->enable();
+                $storage->activate();
             }
 
             // Sends an email to the account owner.
@@ -444,7 +444,7 @@ class GoogleAppsAccount
             "SELECT  g_admin
                FROM  gapps_accounts
               WHERE  l_userid = {?} AND g_status = 'active'", $uid);
-        return ($res->numRows() > 0 ? (bool)$res->fetchOneRow() : false);
+        return ($res->numRows() > 0 ? (bool)$res->fetchOneCell() : false);
     }
 }