Advertises GApps real name change in 'nom d'usage' validation email for active Google...
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 17 Mar 2008 23:08:39 +0000 (00:08 +0100)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Fri, 21 Mar 2008 16:18:00 +0000 (17:18 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
include/validations/nomusage.inc.php

index c3ff4bf..26181b6 100644 (file)
@@ -92,6 +92,13 @@ class UsageReq extends Validate
             if ($this->nom_usage) {
                 $res .= "\n\n  Les alias {$this->alias}@{$globals->mail->domain} et @{$globals->mail->domain2} sont maintenant à ta disposition !";
             }
+            if ($globals->mailstorage->googleapps_domain) {
+                require_once 'googleapps.inc.php';
+                $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+                if ($account->active()) {
+                    $res .= "\n\n  Si tu utilises Google Apps, tu peux changer ton nom d'usage sur https://mail.google.com/a/polytechnique.org/#settings/accounts";
+                }
+            }
             return $res;
         } else {
             return "  La demande de changement de nom d'usage que tu avais faite a été refusée.";