$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getByName('Site Members')/Users? $filter=Id eq " + _spPageContextInfo.userId,
type: "GET",
cache: true,
async: false,
headers:{
"ACCEPT": "application/json;odata=verbose"
},
success: function (data) {
if (data.d.results[0] != undefined) {
//user is a member
}
},
error: function () {
}
});
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getByName('Site Members')/Users? $filter=Id eq " + _spPageContextInfo.userId,
type: "GET",
cache: true,
async: false,
headers:{
"ACCEPT": "application/json;odata=verbose"
},
success: function (data) {
if (data.d.results[0] != undefined) {
//user is a member
}
},
error: function () {
}
});