fixed non-existent profiles being shown

This commit is contained in:
flash 2016-12-07 15:26:52 +01:00
parent 0602d7f109
commit b3fac428e9

View file

@ -1,11 +1,8 @@
{% extends 'master.twig' %} {% extends 'master.twig' %}
{% set profileHidden = not profile.activated and (user.id != profile.id and not (user.perms.isMod or user.perms.isAdmin)) %} {% set profileHidden = profile.id == 0 or not profile.activated and (user.id != profile.id and not (user.perms.isMod or user.perms.isAdmin)) %}
{% set noUserpage = profile.userPage|length < 1 %} {% set noUserpage = profile.userPage|length < 1 %}
{% set title = profileHidden ? 'User not found!' : 'Profile of ' ~ profile.username %} {% set title = profileHidden ? 'User not found!' : 'Profile of ' ~ profile.username %}
{% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %} {% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %}
{% set fields = { {% set fields = {