Frontend\Modules\Profiles\Engine\Authentication::cleanupOldSessions PHP Method

cleanupOldSessions() public static method

Cleanup old session records in the database.
public static cleanupOldSessions ( )
    public static function cleanupOldSessions()
    {
        // remove all sessions with date older then 1 month
        FrontendModel::getContainer()->get('database')->delete('profiles_sessions', 'date <= DATE_SUB(NOW(), INTERVAL 1 MONTH)');
    }