{if condition="!$connection"}

Connected as {$current_user->getDisplayName()}.

{/if}