//#import $owl_user_third_openid:services/modelService.jsx

var UserThirdUtil = (function () {
    var f = {
        getThirdOpenId: function (openid_source_id, type, userId) {
            var searchArgs = {
                openid_source_id: openid_source_id,
                type: type,
                user_id: userId
            }

            var searchResult = owl_user_third_openidService.search(null, searchArgs, null, 0, 1, null);
            if (searchResult.state === 'ok') {
                if (searchResult.list.length > 0) {
                    return searchResult.list[0];
                }
            }
            return null;
        }
    };
    return f;
})();