Merge remote-tracking branch 'origin/email-verification'

# Conflicts:
#	composer.lock
#	public/mix-manifest.json
#	tests/TestCase.php
This commit is contained in:
Peter Papp
2021-07-15 14:00:43 +02:00
43 changed files with 988 additions and 12292 deletions
+12
View File
@@ -3,6 +3,7 @@ namespace App\Services;
use Carbon\Carbon;
use App\Models\Zip;
use App\Models\User;
use App\Models\Share;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
@@ -74,4 +75,15 @@ class SchedulerService
}
});
}
/**
* Delete unverified users older than 30 days
*/
public function delete_unverified_users(): void
{
User::where('created_at', '<=', now()->subDays(30)->toDateString())
->where('email_verified_at', null)
->get()
->each(fn ($user) => $user->delete());
}
}