Merge commit 'origin/master' into fusionax
[platal.git] / include / validations.inc.php
index a8f45f7..fef4df2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -85,6 +85,10 @@ abstract class Validate
         $this->stamp  = date('YmdHis');
         $this->unique = $_unique;
         $this->type   = $_type;
+        $res = XDB::query("SELECT  promo
+                             FROM  profile_display
+                            WHERE  pid={?}", $this->user->id());
+        $this->promo = $res->fetchOneCell();
     }
 
     // }}}
@@ -183,7 +187,7 @@ abstract class Validate
             $mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}");
             $mailer->addTo($globals->core->admin_email);
 
-            $body = "Validation {$this->type} pour {$this->user->id()}\n\n"
+            $body = "Validation {$this->type} pour {$this->user->login()}\n\n"
               . S::user()->login() . " a ajouté le commentaire :\n\n"
               . Env::v('comm') . "\n\n"
               . "cf la discussion sur : " . $globals->baseurl . "/admin/validate";