X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=templates%2Finclude%2Fminifiche.tpl;h=16dac4f523414e1f2278a5b2b397183375d16c5a;hb=b9d254dfbec04814a5301ee1f49a3793cf763716;hp=53f7d6b327ee603b5230c9c78ddb86f44cf7223f;hpb=5b516e6be17378ace0e375b9da14a46051bf0f4e;p=platal.git diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 53f7d6b..16dac4f 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} -