mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Can easily get information about a single user
This commit is contained in:
parent
f3cf290822
commit
589b96d8bb
@ -181,6 +181,22 @@ function getUserInfo(usersID, afterGetUserInfo, forceRequest){
|
||||
ComunicWeb.user.userInfos.getUserInfos(usersID, afterGetUserInfo, forceRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information about a single user asynchronously
|
||||
*
|
||||
* @param {Number} userID Target user ID
|
||||
*/
|
||||
function userInfo(userID) {
|
||||
return new Promise((res, err) => {
|
||||
getUserInfo(userID, (data) => {
|
||||
if(data.error)
|
||||
err(data.error)
|
||||
else
|
||||
res(data)
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Display message on browser console
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user