Conto Comunitario...
This commit is contained in:
@@ -1656,9 +1656,11 @@ UserSchema.statics.getUserProfileByUsername = async function (
|
||||
'useraport.profile.img': 1,
|
||||
};
|
||||
}
|
||||
|
||||
let regexpusername = new RegExp(`^${username}$`, 'i');
|
||||
|
||||
const myfind = {
|
||||
idapp, username,
|
||||
idapp, username: { $regex: regexpusername },
|
||||
$or: [{ deleted: { $exists: false } }, { deleted: { $exists: true, $eq: false } }],
|
||||
};
|
||||
|
||||
@@ -4536,6 +4538,12 @@ UserSchema.statics.addExtraInfo = async function (idapp, recUser, recUserSave) {
|
||||
const circuitobj = await Circuit.getCircuitsByUsername(idapp, recUser.username, recUser);
|
||||
|
||||
const useraccounts = await Account.getUserAccounts(idapp, recUser.username);
|
||||
|
||||
for (const group of listManageGroups) {
|
||||
const myaccounts = await Account.getGroupAccounts(idapp, group.groupname);
|
||||
if (myaccounts && myaccounts.length > 0)
|
||||
group.account = myaccounts[0]
|
||||
}
|
||||
|
||||
recUser.profile = { ...recUser.profile, ...circuitobj, useraccounts };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user