Created a function to quickly access user name.

This commit is contained in:
Pierre 2018-01-21 20:20:10 +01:00
parent 27b10964be
commit b3a3370f56

View File

@ -60,6 +60,16 @@ function userID(){
return ComunicWeb.user.userLogin.getUserID(); return ComunicWeb.user.userLogin.getUserID();
} }
/**
* Returns the full name of a user
*
* @param {Object} infos Informations about the user
* @return {String} The full name of the user
*/
function userFullName(infos){
return infos.firstName + " " + infos.lastName;
}
/** /**
* Return the ID of a user, or its path, depending of what * Return the ID of a user, or its path, depending of what
* is available * is available