Introduces email type alias_aux for emails in auxiliary domains.
[platal.git] / classes / xnet.php
index 08e6163..8df2ae3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -24,7 +24,7 @@ class Xnet extends Platal
     public function __construct()
     {
         parent::__construct('xnet', 'xnetgrp', 'xnetlists', 'xnetevents',
-                            'payment', 'bandeau');
+                            'payment', 'bandeau', 'xnetnl');
     }
 
     public function hook_map($name)
@@ -45,9 +45,14 @@ class Xnet extends Platal
         return $ans;
     }
 
-    public function force_login(PlPage &$page)
+    public function force_login(PlPage $page)
     {
-        http_redirect(S::v('loginX'));
+        $redirect = S::v('loginX');
+        if (!$redirect) {
+            $page->trigError('Impossible de s\'authentifier. Problème de configuration de plat/al.');
+            return;
+        }
+        http_redirect($redirect);
     }
 }