mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-23 12:39:22 +00:00
28 lines
439 B
JavaScript
28 lines
439 B
JavaScript
|
/**
|
||
|
* Groups utilities
|
||
|
*
|
||
|
* @author Pierre HUBERT
|
||
|
*/
|
||
|
|
||
|
ComunicWeb.components.groups.utils = {
|
||
|
|
||
|
/**
|
||
|
* Extract users ids from members list
|
||
|
*
|
||
|
* @param {Array} list The list of members to process
|
||
|
* @return {Array} The list of the IDs of the members of group
|
||
|
*/
|
||
|
getMembersIDs: function(list){
|
||
|
|
||
|
var IDs = [];
|
||
|
|
||
|
//Process the list of IDs
|
||
|
list.forEach(function(member){
|
||
|
IDs.push(member.user_id);
|
||
|
});
|
||
|
|
||
|
return IDs;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|