private function checkEmail(Segment $segment, $email)
    {
        $user = $this->usersRepository->findBy('email', $email);
        if (!$user) {
            return false;
        }
        return $segment->isIn('email', $email);
    }