fix: change emails to lowercase on init
This commit is contained in:
parent
63cff9e399
commit
f408d603cf
1 changed files with 7 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
use App\Models\ScheduledDatabaseBackup;
|
||||
use App\Models\Server;
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Models\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
|
@ -41,6 +42,7 @@ public function handle()
|
|||
$this->disable_metrics();
|
||||
$this->replace_slash_in_environment_name();
|
||||
$this->restore_coolify_db_backup();
|
||||
$this->update_user_emails();
|
||||
//
|
||||
$this->update_traefik_labels();
|
||||
if (! isCloud() || $this->option('force-cloud')) {
|
||||
|
|
@ -92,6 +94,11 @@ private function disable_metrics()
|
|||
}
|
||||
}
|
||||
|
||||
private function update_user_emails()
|
||||
{
|
||||
User::whereRaw('email ~ \'[A-Z]\'')->get()->each(fn (User $user) => $user->update(['email' => strtolower($user->email)]));
|
||||
}
|
||||
|
||||
private function update_traefik_labels()
|
||||
{
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue