diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2023-03-02 18:43:29 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2023-03-02 18:43:29 +0100 |
commit | f0e991a90db5d5f13b432c166a22092fd3075a36 (patch) | |
tree | e3237439d92e0f5896744f5730fa8d9ddb98c855 | |
parent | 1c46f56b50b71aa0794b8a8939488b9403371f6b (diff) |
profile: respect profile visibility setting
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 1058837..caa7805 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -635,8 +635,12 @@ sub public_profile { my $name = $self->stash('name'); my $user = $self->users->get_privacy_by_name( name => $name ); - if ( not $user ) { + if ( not $user + or $user->{past_visible} == 0 + or ( $user->{past_visible} == 1 and not $self->is_user_authenticated ) ) + { $self->render('not_found'); + return; } my $status = $self->get_user_status( $user->{id} ); |