• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Delete User's images after a certain time as well

DarkTexas 🦄

Chevereto Member
Hi!

I've changed according to this answer by @Rodolfo (THREAD) I have changed my app/lib/classes/class.image.php to:

Code:
    public static function getAvailableExpirations()
    {
        $string = _s('After %n %t');
        $translate = [ // Just for gettext parsing
            'minute' => _n('minute', 'minutes', 1),
            'hour'    => _n('hour', 'hours', 1),
            'day'        => _n('day', 'days', 1),
            'week'    => _n('week', 'weeks', 1),
            'month'    => _n('month', 'months', 1),
            'year'    => _n('year', 'years', 1),
        ];
        $table = [
            ['day', 3],
            ['day', 7],
            ['month', 1],
        ];
        foreach ($table as $expire) {
            $unit = $expire[0];
            $interval_spec = 'P' . (in_array($unit, ['second', 'minute', 'hour']) ? 'T' : null) . $expire[1] . strtoupper($unit[0]);
            $return[$interval_spec] = strtr($string, ['%n' => $expire[1], '%t' => _n($unit, $unit . 's', $expire[1])]);
        }
        return $return;
    }

However, when a User does register themself and uploads a image the expire time (for the upload, checked via PHPMyAdmin) is set to NULL unless the user goes into their settings and hits "Save", where all 3 options are available. Without changing anything but pressing "Save" the next upload does have a expire time.

Is that a bug or do I need to do something else?
 
Back
Top