mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-22 21:14:42 +00:00
Merge remote-tracking branch 'origin/email-verification'
# Conflicts: # composer.lock # public/mix-manifest.json # tests/TestCase.php
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user