private function checkFirstUser(Application $app, $route)
    {
        /** @var UsersRepository $repo */
        $repo = $app['storage']->getRepository(Entity\Users::class);
        try {
            $userCount = $repo->count();
        } catch (TableNotFoundException $e) {
            $app['schema']->update();
            $app['logger.flash']->info(Trans::__('general.phrase.users-none-create-first'));

            return $this->redirectToRoute('userfirst');
        }

        // If the users table is present, but there are no users, and we're on
        // /bolt/userfirst, we let the user stay, because they need to set up
        // the first user.
        if ($userCount === 0) {
            return $route === 'userfirst' ? null : $this->redirectToRoute('userfirst');
        }

        return true;
    }