The ```$logged_in``` variable is a little more readable than checking against uid. Also the alternative syntax should be used for conditions in templates (using ```:``` / ```endif;``` instead of ```{}```)

```php
<?php if ($logged_in): ?>
```