users and profiles working

This commit is contained in:
Adolfo Reyna
2021-09-02 09:59:58 -07:00
parent a7ca68e6df
commit ba2b0bcbd6
4 changed files with 28 additions and 2 deletions

View File

@@ -39,8 +39,10 @@ userDB = (DB) => {
console.log(err);
return false;
});
if (r[0]) userProfileCache[r[0].id] = r[0];
return r[0];
let index = 0;
while(r[index].isGroup) index += 1;
if (r[index]) userProfileCache[r[index].id] = r[index];
return r[index];
}
//Groups