Fixes best_domain initialization.
authorStéphane Jacob <sj@m4x.org>
Wed, 30 Nov 2011 15:32:59 +0000 (16:32 +0100)
committerStéphane Jacob <sj@m4x.org>
Wed, 30 Nov 2011 15:33:18 +0000 (16:33 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/admin.php

index e034bca..a993a9c 100644 (file)
@@ -856,7 +856,10 @@ class AdminModule extends PLModule
                   default:
                     $page->killError("La formation n'est pas reconnue : " . Env::t('edu_type') . '.');
                 }
-                $best_domain = User::$sub_mail_domains[$type] . Platal::globals()->mail->domain;
+                $best_domain = XDB::fetchOneCell('SELECT  id
+                                                    FROM  email_virtual_domains
+                                                   WHERE  name = {?}',
+                                                 User::$sub_mail_domains[$type] . Platal::globals()->mail->domain);
 
                 XDB::startTransaction();
                 foreach ($lines as $line) {