X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgoogleapps.inc.php;h=f7ab2bf1e2ce3da9034a532c6f48648eb883fa76;hb=517ecea1229f166ce51fe443f428381ad5912f83;hp=f4cc69c5e4262dcee7c309ffa0b8e00b566afec6;hpb=020a95fa78dc544b3064739d409026a0056d98f4;p=platal.git diff --git a/include/googleapps.inc.php b/include/googleapps.inc.php index f4cc69c..f7ab2bf 100644 --- a/include/googleapps.inc.php +++ b/include/googleapps.inc.php @@ -1,6 +1,6 @@ activate_mail_redirection) { - require_once('emails.inc.php'); - $storage = new EmailStorage($user, 'googleapps'); - $storage->activate(); + require_once 'emails.inc.php'; + Email::activate_storage($user, 'googleapps'); } // Sends the 'account created' email to the user, with basic documentation. @@ -63,13 +62,12 @@ function post_queue_u_update($job) { } if (isset($parameters['suspended']) && $parameters['suspended'] == false) { - require_once('emails.inc.php'); + require_once 'emails.inc.php'; $account = new GoogleAppsAccount($user); if ($account->active()) { // Re-adds the email redirection (if the user did request it). if ($account->activate_mail_redirection) { - $storage = new EmailStorage($user, 'googleapps'); - $storage->activate(); + Email::activate_storage($user, 'googleapps'); } // Sends an email to the account owner. @@ -124,7 +122,7 @@ class GoogleAppsAccount // Constructs the account object, by retrieving all informations from the // GApps account table, from GApps job queue, and from plat/al validation queue. - public function __construct(User &$user) + public function __construct(User $user) { $this->user = &$user; if (!$this->user || !$this->user->login()) {