diff --git a/app/libs/Auth/Models/User.php b/app/libs/Auth/Models/User.php index c1d70d96..5f407abb 100644 --- a/app/libs/Auth/Models/User.php +++ b/app/libs/Auth/Models/User.php @@ -109,7 +109,7 @@ class User extends BaseEntity /** * @var bool */ - #[ORM\Column(name: 'public_profile_allow_chat_with_me', options: ['default' => 0], type: 'boolean')] + #[ORM\Column(name: 'public_profile_allow_chat_with_me', options: ['default' => 1], type: 'boolean')] private $public_profile_allow_chat_with_me; /** @@ -464,7 +464,7 @@ public function __construct() $this->public_profile_show_social_media_info = false; $this->public_profile_show_bio = true; $this->public_profile_show_telephone_number = false; - $this->public_profile_allow_chat_with_me = false; + $this->public_profile_allow_chat_with_me = true; $this->password = ""; $this->identifier = null; diff --git a/tests/unit/UserMappingTest.php b/tests/unit/UserMappingTest.php index add4d479..6dec45a9 100644 --- a/tests/unit/UserMappingTest.php +++ b/tests/unit/UserMappingTest.php @@ -29,6 +29,12 @@ */ class UserMappingTest extends BrowserKitTestCase { + public function testDefaultPublicProfileAllowChatWithMeIsTrue() + { + $user = new User(); + $this->assertTrue($user->isPublicProfileAllowChatWithMe()); + } + public function testUserPersistence() { $email = 'test@nomail.com';