X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=e018b4b0a2b212ddd811e949256e010400e9e251;hb=73682f225b86186e67c8b4c9406053bd99b354e6;hp=1b7177a6066594fd942a5c0a9ac681bddd55b0b8;hpb=f5642983eb146b88f7a81de03e8b7bca74b46df0;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 1b7177a..e018b4b 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 Polytechnique.org *} +{* Copyright (C) 2003-2010 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -20,22 +20,31 @@ {* *} {**************************************************************************} -{assign var=profile value=$user->profile()} {assign var=dead value=$profile->deathdate} -{if $user->state neq 'pending'} -{assign var=registered value=true} -{else} -{assign var=registered value=false} -{/if} {if $smarty.session.auth ge AUTH_COOKIE} -{assign var=withAuth value=true} + {assign var=withAuth value=true} + {assign var=user value=$profile->owner()} + {if $user == null} + {assign var=hasowner value=false} + {assign var=registered value=false} + {else} + {assign var=hasowner value=true} + {if $user->state neq 'pending'} + {assign var=registered value=true} + {else} + {assign var=registered value=false} + {/if} + {/if} {else} -{assign var=withAuth value=false} + {* Without auth, all profiles appear as registered and with owner *} + {assign var=hasowner value=true} + {assign var=registered value=true} + {assign var=withAuth value=false} {/if} -