18 lines
574 B
Text
18 lines
574 B
Text
|
#!/usr/bin/env php
|
||
|
<?php
|
||
|
require_once __DIR__ . '/../eeprom.php';
|
||
|
|
||
|
if($argc <= 1)
|
||
|
die(sprintf('No uploader ID specified.%s', PHP_EOL));
|
||
|
|
||
|
$userId = $argv[1];
|
||
|
|
||
|
try {
|
||
|
printf('Attempting to delete uploads by user #%s...%s', $userId, PHP_EOL);
|
||
|
$eeprom->uploadsCtx->uploads->deleteUploadsByUser($userId);
|
||
|
printf('Done! Actual purging of data in storage will be handled by the next cron cycle.%s', PHP_EOL);
|
||
|
} catch(Exception $ex) {
|
||
|
printf('Exception occurred while trying to delete user uploads:%s', PHP_EOL);
|
||
|
printf('%s%s', $ex->getMessage(), PHP_EOL);
|
||
|
}
|