From: Vincent Zanotti Date: Sat, 11 Oct 2008 17:13:06 +0000 (+0200) Subject: Fixes use of object User in module GoogleApps. X-Git-Tag: xorg/0.10.0~86^2~11 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=88cddbaa6de3733235749777e7e20aa2c51e884c;p=platal.git Fixes use of object User in module GoogleApps. Signed-off-by: Vincent Zanotti --- diff --git a/modules/googleapps.php b/modules/googleapps.php index 0a22f86..0d868c7 100644 --- a/modules/googleapps.php +++ b/modules/googleapps.php @@ -44,17 +44,18 @@ class GoogleAppsModule extends PLModule $page->addJsLink('motdepasse.js'); $page->setTitle('Compte Google Apps'); - $account = new GoogleAppsAccount(S::user()); + $user = S::user(); + $account = new GoogleAppsAccount($user); // Fills up the 'is Google Apps redirection active' variable. $page->assign('redirect_active', false); $page->assign('redirect_unique', true); if ($account->active()) { - $redirect = new Redirect(S::user()); + $redirect = new Redirect($user); $page->assign('redirect_unique', !$redirect->other_active('googleapps')); - $storage = new EmailStorage(S::v('uid'), 'googleapps'); + $storage = new EmailStorage($user, 'googleapps'); $page->assign('redirect_active', $storage->active); } @@ -193,7 +194,7 @@ class GoogleAppsModule extends PLModule if ($user) { $account = new GoogleAppsAccount($user); - $storage = new EmailStorage($user->id(), 'googleapps'); + $storage = new EmailStorage($user, 'googleapps'); // Force synchronization of plat/al and Google Apps passwords. if ($action == 'forcesync' && $account->sync_password) {