Fixed user not found error page.
This commit is contained in:
parent
0339bc3ec9
commit
c750591782
2 changed files with 4 additions and 5 deletions
|
@ -23,14 +23,13 @@ try {
|
|||
$profileUser = User::findForProfile($userId);
|
||||
} catch(UserNotFoundException $ex) {
|
||||
http_response_code(404);
|
||||
//Template::render('profile.index');
|
||||
echo 'User not found.';
|
||||
Template::render('profile.index');
|
||||
return;
|
||||
}
|
||||
|
||||
if($profileUser->isDeleted()) {
|
||||
http_response_code(404);
|
||||
echo 'User not found.';
|
||||
Template::render('profile.index');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@
|
|||
{% endif %}
|
||||
|
||||
<div class="profile__content">
|
||||
{% set profile_fields = profile_user.profileFields(not (profile_is_editing and perms.edit_profile)) %}
|
||||
{% set show_profile_fields = profile_is_editing ? perms.edit_profile : profile_fields|default([])|length > 0 %}
|
||||
{% set profile_fields = profile_user.profileFields(not (profile_is_editing and perms.edit_profile))|default([]) %}
|
||||
{% set show_profile_fields = profile_is_editing ? perms.edit_profile : profile_fields|length > 0 %}
|
||||
{% set show_background_settings = profile_is_editing and perms.edit_background %}
|
||||
{% set show_birthdate = profile_is_editing and perms.edit_birthdate %}
|
||||
{% set show_sidebar = current_user is not defined or show_profile_fields or show_background_settings %}
|
||||
|
|
Loading…
Add table
Reference in a new issue