From: x2003bruneau
Date: Wed, 28 Mar 2007 12:33:43 +0000 (+0000)
Subject: Recovery fails when the user has no valid redirection
X-Git-Tag: xorg/0.9.14~159
X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8c28edc9a426a1b0098fd4a5049333ef2ba815b9;p=platal.git
Recovery fails when the user has no valid redirection
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1627 839d8a87-29fc-0310-9880-83ba4fa771e5
---
diff --git a/modules/platal.php b/modules/platal.php
index e3dd192..6077f50 100644
--- a/modules/platal.php
+++ b/modules/platal.php
@@ -272,6 +272,15 @@ class PlatalModule extends PLModule
list($uid, $naissance) = $res->fetchOneRow();
if ($naissance == $birth) {
+ $res = XDB::query("SELECT COUNT(*)
+ FROM emails
+ WHERE uid = {?} AND flags != 'panne' AND flags != 'filter'", $uid);
+ $count = intval($res->fetchOneCell());
+ if ($count == 0) {
+ $page->assign('no_addr', true);
+ return;
+ }
+
$page->assign('ok', true);
$url = rand_url_id();
diff --git a/templates/platal/recovery.tpl b/templates/platal/recovery.tpl
index 6dc1243..ac11d18 100644
--- a/templates/platal/recovery.tpl
+++ b/templates/platal/recovery.tpl
@@ -35,6 +35,18 @@ ton adresse en {#globals.mail.domain#}. Ce certificat te permet d'accéder à un
Si tu n'accèdes pas à ton mail dans les 6 heures, sollicite un nouveau certificat sur cette page.
+{elseif $no_addr}
+
+
+ {icon name=error} Les informations n'ont pas pu être envoyées car ton adresse {#globals.core.sitename#} n'a plus
+ de redirection fonctionnelle.
+
+
+
+ Contacte le support pour que nous puissions régler ton problème
+ au plus vite.
+
+
{else}