@classmethod
def get_by_userid(cls, user_id):
    """Get profile by user identifier.

        :param user_id: Identifier of a :class:`~invenio_accounts.models.User`.
        :returns: A :class:`~invenio_userprofiles.models.UserProfile` instance
            or ``None``.
        """
    return cls.query.filter_by(user_id=user_id).one_or_none()
