How to check if there is a user in the group or not?

At the moment I’m using the API (180ms time).

 $.ajax({
  url: "/u/"+ username +".json" ,
  dataType: 'json',
  async: false,
  success: function(data) {
...
 for (var t = 0; t < groups.length; t++) { 
 g_id = groups[t].id;
 if (g_id === 57) { ...

Maybe there is some other way to get this data? Through the API, other data unnecessary for the plugin is requested. I would like to get only one value. The user belongs to a particular group or not.

1 Like