def METHOD_NAME(self, user):
    """
    Return a list of pubids which the user created.
    If the passed-in user is ``None``, this returns an empty list.
    :type user: `h.models.user.User` or None
    """
    if user is None:
        return []
    return [
        g.pubid for g in self.session.query(Group.pubid).filter_by(creator=user)
    ]