Skip to content

Commit f8d619f

Browse files
authored
change default values (#31)
Signed-off-by: romanetar <roman_ag@hotmail.com>
1 parent 1cd3844 commit f8d619f

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

app/libs/Auth/Models/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ public function __construct()
437437
$this->email_verified = false;
438438
$this->public_profile_show_photo = false;
439439
$this->public_profile_show_email = false;
440-
$this->public_profile_show_fullname = false;
441-
$this->public_profile_allow_chat_with_me = false;
440+
$this->public_profile_show_fullname = true;
441+
$this->public_profile_allow_chat_with_me = true;
442442
$this->password = "";
443443
$this->identifier = null;
444444
$this->gender_specify = "";
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
/**
3+
* Copyright 2023 OpenStack Foundation
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
**/
14+
15+
namespace Database\Migrations;
16+
17+
use Doctrine\Migrations\AbstractMigration;
18+
use Doctrine\DBAL\Schema\Schema as Schema;
19+
20+
/**
21+
* Class Version20230601162315
22+
* @package Database\Migrations
23+
*/
24+
final class Version20230601162315 extends AbstractMigration
25+
{
26+
/**
27+
* @param Schema $schema
28+
*/
29+
public function up(Schema $schema): void
30+
{
31+
$this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '1' NOT NULL;");
32+
$this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '1' NOT NULL;");
33+
}
34+
35+
/**
36+
* @param Schema $schema
37+
*/
38+
public function down(Schema $schema): void
39+
{
40+
$this->addSql("ALTER TABLE users MODIFY public_profile_show_fullname tinyint(1) DEFAULT '0' NOT NULL;");
41+
$this->addSql("ALTER TABLE users MODIFY public_profile_allow_chat_with_me tinyint(1) DEFAULT '0' NOT NULL;");
42+
}
43+
}

0 commit comments

Comments
 (0)