(!empty($GLOBALS['IS_XNET_SITE']) ?
'INNER JOIN groupex.membres AS gxm ON (u.user_id = gxm.uid
AND gxm.asso_id = ' . $globals->asso('id') . ') ' : '')
- . 'LEFT JOIN auth_user_quick AS q USING (user_id)
- LEFT JOIN aliases AS a ON (a.id = u.user_id AND a.type = \'a_vie\')
- ' . $joins,
+ . 'LEFT JOIN auth_user_quick AS q USING (user_id)' . $joins,
$where,
'u.user_id');
}
public function fields()
{
- return "u.user_id AS id,
- u.*, a.alias AS forlife,
+ global $globals;
+ return "u.user_id AS id, u.*,
+ CONCAT(a.alias, '@{$globals->mail->domain}') AS bestemail,
u.perms != 'pending' AS inscrit,
u.perms != 'pending' AS wasinscrit,
u.deces != 0 AS dcd, u.deces, u.matricule_ax,
AND FIND_IN_SET('active', adr.statut)".(S::logged() ? "" : " AND adr.pub = 'public'").")
LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2)
LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region)
+ LEFT JOIN aliases AS a ON (a.id = u.user_id AND FIND_IN_SET('bestalias', a.flags))
LEFT JOIN emails AS em ON (em.uid = u.user_id AND em.flags = 'active')" .
(S::logged() ?
"LEFT JOIN contacts AS c On (c.contact = u.user_id AND c.uid = " . S::v('uid') . ")"
public function fields()
{
- return "m.uid, u.prenom, u.nom, u.promo,
- a.alias AS forlife, m.expertise, mp.pid,
- ms.secteur, ms.ss_secteur";
+ return "m.uid, u.prenom, u.nom, u.promo, u.hruid,
+ m.expertise, mp.pid, ms.secteur, ms.ss_secteur";
}
public function bounds()
public function fields()
{
- return "u.user_id, IF(u.nom_usage != '', u.nom_usage, u.nom) AS nom, u.prenom, u.promo, a.alias AS forlife ";
+ return "u.user_id, IF(u.nom_usage != '', u.nom_usage, u.nom) AS nom, u.prenom, u.promo, u.hruid ";
}
public function joins()
public function fields()
{
- return "u.user_id AS id,
- u.*, a.alias AS forlife," .
+ return "u.user_id AS id, u.*," .
(S::logged() ? "q.profile_mobile AS mobile, " : "IF(q.profile_mobile_pub = 'public', q.profile_mobile, NULL) as mobile, ") .
"u.perms != 'pending' AS inscrit,
u.perms != 'pending' AS wasinscrit,
{* *}
{**************************************************************************}
-{if !$c.inscrit || $c.dcd}<div class='grayed'>{/if}
+{if (!$c.inscrit && $smarty.session.auth ge AUTH_COOKIE) || $c.dcd}<div class='grayed'>{/if}
<div class="contact" {if $c.inscrit}{if $smarty.session.auth ge AUTH_COOKIE}title="Fiche mise à jour le {$c.date|date_format}"{/if}{/if}>
<div class="nom">
{if $c.sexe}•{/if}
- {if !$c.dcd && $c.inscrit}<a href="profile/{$c.forlife}" class="popup2">{/if}
+ {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}<a href="profile/{$c.hruid}" class="popup2">{/if}
{if $c.nom_usage}{$c.nom_usage} {$c.prenom}<br />({$c.nom}){else}{$c.nom} {$c.prenom}{/if}
- {if !$c.dcd && $c.inscrit}</a>{/if}
+ {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}</a>{/if}
</div>
<div class="autre">
{if $c.iso3166}
*}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
{/if}
{elseif $c.wasinscrit && !$c.dcd}
- <a href="vcard/{$c.forlife}.vcf">{*
+ <a href="vcard/{$c.hruid}.vcf">{*
*}{icon name=vcard title="Afficher la carte de visite"}</a>
{if $show_action eq ajouter}
- <a href="carnet/contacts?action={$show_action}&user={$c.forlife}&token={xsrf_token}" target="_top">{*
+ <a href="carnet/contacts?action={$show_action}&user={$c.hruid}&token={xsrf_token}" target="_top">{*
*}{icon name=add title="Ajouter à mes contacts"}</a>
{else}
- <a href="carnet/contacts?action={$show_action}&user={$c.forlife}&token={xsrf_token}" target="_top">{*
+ <a href="carnet/contacts?action={$show_action}&user={$c.hruid}&token={xsrf_token}" target="_top">{*
*}{icon name=cross title="Retirer de mes contacts"}</a>
{/if}
{/if}
<div class="error">{$error}</div>
{elseif $set}
<div class="contact-list">
-{iterate from=$set item=res}
+{foreach from=$set item=res}
{if $res.contact}
{include file="gadgets/ig-minifiche.tpl" c=$res show_action="retirer"}
{else}
{include file="gadgets/ig-minifiche.tpl" c=$res show_action="ajouter"}
{/if}
-{/iterate}
+{/foreach}
</div>
<div class="more">
<a href="search?quick={$smarty.request.quick}" target="_blank">{$result_count} résultats au total</a> >>>
{if !$c.dcd}
<a href="vcard/{$c.hruid}.vcf">{*
*}{icon name=vcard title="Afficher la carte de visite"}</a>
- <a href="mailto:{$c.forlife}@{#globals.mail.domain#}">{*
+ <a href="mailto:{$c.bestemail}">{*
*}{icon name=email title="Envoyer un email"}</a>
{if $show_action eq ajouter}
<a href="carnet/contacts?action={$show_action}&user={$c.hruid}&token={xsrf_token}">{*
</div>
<div class="bits" style="width: 40%;">
<span class='smaller'>
- <a href="profile/{$p.forlife}" class="popup2">
+ <a href="profile/{$p.hruid}" class="popup2">
{icon name=user_suit title="Voir sa fiche"}</a> -
- <a href="referent/{$p.forlife}" class="popup2">Voir sa fiche référent</a>
+ <a href="referent/{$p.hruid}" class="popup2">Voir sa fiche référent</a>
</span>
</div>
<div class="long">
{if $smarty.section.trombi.index % 3 == 1}
<tr>
<td class="center" style="vertical-align: middle">
- <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].forlife}" class="popup2">
- <img src="photo/{$set[trombi.index_prev].forlife}" width="110" alt=" [ PHOTO ] " />
+ <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].hruid}" class="popup2">
+ <img src="photo/{$set[trombi.index_prev].hruid}" width="110" alt=" [ PHOTO ] " />
</a>
{if $trombi_with_admin && hasPerm('admin')}
<a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_prev].user_id}">{icon name=wrench title="[admin]"}</a>
{/if}
</td>
<td class="center" style="vertical-align: middle">
- <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
- <img src="photo/{$set[trombi].forlife}" width="110" alt=" [ PHOTO ] " />
+ <a href="{$mainsiteurl}profile/{$set[trombi].hruid}" class="popup2">
+ <img src="photo/{$set[trombi].hruid}" width="110" alt=" [ PHOTO ] " />
</a>
{if $trombi_with_admin && hasPerm('admin')}
<a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
</td>
<td class="center" style="vertical-align: middle">
{if $set[trombi.index_next]}
- <a href="{$mainsiteurl}profile/{$set[trombi.index_next].forlife}" class="popup2">
- <img src="photo/{$set[trombi.index_next].forlife}" width="110" alt=" [ PHOTO ] " />
+ <a href="{$mainsiteurl}profile/{$set[trombi.index_next].hruid}" class="popup2">
+ <img src="photo/{$set[trombi.index_next].hruid}" width="110" alt=" [ PHOTO ] " />
</a>
{if $trombi_with_admin && hasPerm('admin')}
<a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_next].user_id}">{icon name=wrench title="[admin]"}</a>
</tr>
<tr>
<td class="center" style="vertical-align: bottom; padding-bottom: 15px">
- <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].forlife}" class="popup2">
+ <a href="{$mainsiteurl}profile/{$set[trombi.index_prev].hruid}" class="popup2">
{$set[trombi.index_prev].prenom} {$set[trombi.index_prev].nom}{if $trombi_with_promo} ({$set[trombi.index_prev].promo}){/if}
</a>
</td>
<td class="center" style="vertical-align: bottom; padding-bottom: 15px">
- <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
+ <a href="{$mainsiteurl}profile/{$set[trombi].hruid}" class="popup2">
{$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if}
</a>
</td>
<td class="center" style="vertical-align: bottom; padding-bottom: 15px">
{if $set[trombi.index_next]}
- <a href="{$mainsiteurl}profile/{$set[trombi.index_next].forlife}" class="popup2">
+ <a href="{$mainsiteurl}profile/{$set[trombi.index_next].hruid}" class="popup2">
{$set[trombi.index_next].prenom} {$set[trombi.index_next].nom}{if $trombi_with_promo} ({$set[trombi.index_next].promo}){/if}
</a>
{/if}
{elseif ($smarty.section.trombi.index % 3 == 0) && ($smarty.section.trombi.last)}
<tr>
<td class="center" style="vertical-align: middle; padding-bottom: 15px">
- <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
- <img src="photo/{$set[trombi].forlife}" width="110" alt=" [ PHOTO ] " />
+ <a href="{$mainsiteurl}profile/{$set[trombi].hruid}" class="popup2">
+ <img src="photo/{$set[trombi].hruid}" width="110" alt=" [ PHOTO ] " />
</a>
{if $trombi_with_admin && hasPerm('admin')}
<a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
</tr>
<tr style="margin-top: 0; padding-top: 0">
<td class="center" style="vertical-align: bottom">
- <a href="{$mainsiteurl}profile/{$set[trombi].forlife}" class="popup2">
+ <a href="{$mainsiteurl}profile/{$set[trombi].hruid}" class="popup2">
{$set[trombi].prenom} {$set[trombi].nom}{if $trombi_with_promo} ({$set[trombi].promo}){/if}
</a>
</td>