X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgoogleapps.inc.php;h=68bf04d0482e02c3a1969a2e407da783040d4b85;hb=3d57237e2ce44f487ebef727aa957c63643f5c1c;hp=a1ae96fa392cb774129e9ec0f66632c6d8f2ac64;hpb=26ba053e75092d038f571b77eaf3005509da0648;p=platal.git diff --git a/include/googleapps.inc.php b/include/googleapps.inc.php index a1ae96f..68bf04d 100644 --- a/include/googleapps.inc.php +++ b/include/googleapps.inc.php @@ -34,9 +34,8 @@ function post_queue_u_create($job) { // the user at creation time. $account = new GoogleAppsAccount($user); if ($account->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.