From b725d7d52cd631f1623012f167599dc08a8639c7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 3 Mar 2023 15:05:00 +0100 Subject: [PATCH] set default visibility to unlisted --- lib/Travelynx/Command/database.pm | 4 +++- lib/Travelynx/Model/Users.pm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index 82f1f47..985b66d 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -1384,7 +1384,9 @@ my @migrations = ( my $res = $db->select( 'users', [ 'id', 'public_level' ] ); while ( my $row = $res->hash ) { my $old_level = $row->{public_level}; - my $new_level = 0; + + # status default: unlisted + my $new_level = 30; if ( $old_level & 0x01 ) { # status: account required diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm index 4124e7b..397b618 100644 --- a/lib/Travelynx/Model/Users.pm +++ b/lib/Travelynx/Model/Users.pm @@ -437,7 +437,7 @@ sub add { { name => $user_name, status => 0, - public_level => $visibility_atoi{private}, + public_level => $visibility_atoi{unlisted}, email => $email, password => $password, registered_at => $now,