public function getAvatar($user, $options = [])
    {
        if (!isset($options['size'])) {
            $options['size'] = 100;
        }

        if (!isset($options['secure'])) {
            $options['secure'] = true;
        }

        try {
            if (method_exists('getEmail', $user)) {
                $email = $user->getEmail();
            } elseif (isset($user->email)) {
                $email = $user->email;
            } elseif (isset($user['email'])) {
                $email = $user['email'];
            }

            $hash = $this->getHash($email);

            if ($options['secure']) {
                $avatar_url = $this->https_url . $hash . '?s=' . $options['size'];
            } else {
                $avatar_url = $this->http_url . $hash . '?s=' . $options['size'];
            }

            return $avatar_url;
        } catch(Exception $e) {
            return false;
        }
    }