X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fnomusage.inc.php;h=b69fb436c37f9d7201fdf9aa8d2c96572f10cfec;hb=b8971a3ed64f3ba69becf1cd8f3b32ee2292026d;hp=c3ff4bf3e33db1e3948ffcb6423a5b5bb9375399;hpb=5f30b30e8b2657ade5c727e98de286386ee002d8;p=platal.git diff --git a/include/validations/nomusage.inc.php b/include/validations/nomusage.inc.php index c3ff4bf..b69fb43 100644 --- a/include/validations/nomusage.inc.php +++ b/include/validations/nomusage.inc.php @@ -49,7 +49,6 @@ class UsageReq extends Validate parent::__construct($_uid, true, 'usage'); $this->nom_usage = $_usage; $this->reason = $_reason; - require_once 'xorg.misc.inc.php'; $this->alias = make_username($this->prenom, $this->nom_usage); if (!$this->nom_usage) $this->alias = ""; @@ -92,6 +91,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(User::get($this->uid)); + 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.";