X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Finclude%2Fminifiche.tpl;h=680af1ca9261e0dae3335d333c4c5ad634dfba50;hb=69fffc4bfc98948ba2357c3d0b1599e90190965a;hp=53f7d6b327ee603b5230c9c78ddb86f44cf7223f;hpb=5b516e6be17378ace0e375b9da14a46051bf0f4e;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 53f7d6b..680af1c 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -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} -