Converts various user of the in-session 'bestalias' and 'forlife' values to hruid.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 12 Oct 2008 14:17:19 +0000 (16:17 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 12 Oct 2008 14:17:19 +0000 (16:17 +0200)
modules/payment/money/cyberpaiement.inc.php
modules/payment/money/paypal.inc.php
modules/register.php
modules/xnetgrp.php
templates/admin/wiki.tpl
templates/carnet/index.tpl
templates/carnet/panel.tpl
templates/geoloc/geoloc.mail.tpl
templates/register/success.tpl
templates/xnetgrp/mail.tpl

index c79935c..987e14c 100644 (file)
@@ -74,7 +74,7 @@ class CyberPayment
             'CHAMP101' => replace_accent(S::v('prenom')),
             'CHAMP102' => '.',
             'CHAMP103' => '.',
-            'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain,
+            'CHAMP104' => S::user()->bestEmail(),
             'CHAMP106' => '.',
             'CHAMP107' => '.',
             'CHAMP108' => '.',
index e1b4d0f..dcd1606 100644 (file)
@@ -75,7 +75,7 @@ class PayPal
         $info_client = Array(
             'first_name' => S::v('prenom'),
             'last_name'  => $name,
-            'email'      => S::v('bestalias').'@' . $globals->mail->domain);
+            'email'      => S::user()->bestEmail());
 
         $res = XDB::query(
             "SELECT a.adr1 AS address1, a.adr2 AS address2,
index 5b098f0..f77841c 100644 (file)
@@ -419,6 +419,7 @@ class RegisterModule extends PLModule
     {
         global $globals;
         $page->changeTpl('register/success.tpl');
+        $page->assign('user', S::user());
 
         $_SESSION['sub_state'] = array('step' => 5);
         if (Env::has('response2'))  {
index 1b20356..bfdea5e 100644 (file)
@@ -317,6 +317,7 @@ class XnetGrpModule extends PLModule
         $mmlist = new MMList(S::v('uid'), S::v('password'),
                            $globals->asso('mail_domain'));
         $page->assign('listes', $mmlist->get_lists());
+        $page->assign('user', S::user());
         $page->addJsLink('ajax.js');
 
         if (Post::has('send')) {
index 45de786..40c645b 100644 (file)
@@ -68,7 +68,7 @@
 {/literal}
 
 <p class="center">
-   <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.forlife}&hash={$smarty.session.core_rss_hash}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</a>
+   <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.hruid}&hash={$smarty.session.core_rss_hash}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</a>
    {icon name=magnifier} <a href="Site/AllRecentChanges">Voir les changements récents</a>
 </p>
 
index b16445f..129e096 100644 (file)
@@ -54,7 +54,7 @@
   <tr>
     <th colspan="2">
       {if $smarty.session.core_rss_hash}
-      <a href="carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Notifications">
+      <a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Notifications">
         {icon name=feed title='fil rss'}
       </a>
       {else}
index ef97c4c..47d982b 100644 (file)
@@ -39,7 +39,7 @@ Il faut pour cela se rendre sur la page de <a href='carnet/notifs'>configuration
 
 <div class="right">
 {if $smarty.session.core_rss_hash}
-<a href="carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
+<a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
 {/if}
 </div>
 
index 64a1c2e..89c421d 100644 (file)
@@ -26,7 +26,7 @@
 {to addr=#to#}
 {subject text="Adresse impossible à geolocaliser"}
 {elseif $mail_part eq 'wiki'}
-Un camarade {$smarty.session.forlife} a forcé l'utilisation de l'adresse entrée
+Un camarade {$smarty.session.hruid} a forcé l'utilisation de l'adresse entrée
 à la main et a refusé la version geolocalisée :
 
 '''Version utilisateur (validée) :'''\\
index 1747f01..0d806d5 100644 (file)
@@ -26,7 +26,7 @@
 
 <p>
 Tu as maintenant accès au site !<br />
-Ton adresse électronique à vie <strong>{$smarty.session.forlife}@{#globals.mail.domain#}</strong> est déjà ouverte, essaie-la !
+Ton adresse électronique à vie <strong>{$user->forlifeEmail()}</strong> est déjà ouverte, essaie-la !
 </p>
 <p class="smaller">
   <strong>Remarque&nbsp;:</strong> m4x.org est un domaine "discret" qui veut dire "mail for X" et
index 4b74cec..2f39797 100644 (file)
@@ -52,7 +52,7 @@ masculin ou féminin, par son prénom, ou son nom.
       <td class="titre">Expéditeur&nbsp;:</td>
       <td>
         <input type="text" name="from" size="55" maxlength="70"
-          value="{if $smarty.request.from}{$smarty.request.from}{else}&quot;{$smarty.session.prenom} {$smarty.session.nom}&quot; <{$smarty.session.bestalias}@polytechnique.org>{/if}" />
+          value="{if $smarty.request.from}{$smarty.request.from}{else}&quot;{$user->fullName()}&quot; &lt;{$user->bestEmail()}&gt;{/if}" />
       </td>
     </tr>
     <tr>