mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
added missing closing bracket
This commit is contained in:
parent
89d375daad
commit
53ad312700
|
@ -150,13 +150,14 @@ class Purge extends Command
|
||||||
->where('item_id', $user->id)
|
->where('item_id', $user->id)
|
||||||
->pluck('filename');
|
->pluck('filename');
|
||||||
foreach($filenames as $filename) {
|
foreach($filenames as $filename) {
|
||||||
try{
|
try {
|
||||||
if (Storage::exists($rel_path.'/'.$filename)) {
|
if (Storage::exists($rel_path . '/' . $filename)) {
|
||||||
Storage::delete($rel_path . '/' . $filename);
|
Storage::delete($rel_path . '/' . $filename);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Log::error('An error occurred while deleting files: ' . $e->getMessage());
|
Log::error('An error occurred while deleting files: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->info('- User "'.$user->username.'" deleted.');
|
$this->info('- User "'.$user->username.'" deleted.');
|
||||||
$user_assoc += $user->userlog()->count();
|
$user_assoc += $user->userlog()->count();
|
||||||
$user->userlog()->forceDelete();
|
$user->userlog()->forceDelete();
|
||||||
|
|
Loading…
Reference in a new issue