mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Upgraded openUserPage function
This commit is contained in:
@ -38,6 +38,19 @@ function openPage(pageURI, additionnalData){
|
||||
* @return {Boolean} True for a success
|
||||
*/
|
||||
function openUserPage(user){
|
||||
if(user.virtualDirectory == "")
|
||||
openUserPageFromID(user.userID);
|
||||
else
|
||||
openPage(user.virtualDirectory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a user page quickly from its user ID
|
||||
*
|
||||
* @param {String} user The ID of the user or its directory
|
||||
* @return {Boolean} True for a success
|
||||
*/
|
||||
function openUserPageFromID(user){
|
||||
return openPage("user/" + user);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user