Nuovo Sistema di registrazione, Completato.
This commit is contained in:
@@ -127,10 +127,27 @@ module.exports.executeQueryTable = async function (idapp, params, userreq) {
|
||||
|
||||
};
|
||||
|
||||
module.exports.findAllIdApp = async function (idapp) {
|
||||
module.exports.findAll = async function () {
|
||||
|
||||
const myfind = { active: true };
|
||||
|
||||
return Site.find(myfind).lean();
|
||||
|
||||
};
|
||||
|
||||
module.exports.findAllIdApp = async function (idapp) {
|
||||
|
||||
const myfind = { idapp, active: true };
|
||||
|
||||
let rec = await Site.findOne(myfind).lean();
|
||||
if (rec) {
|
||||
|
||||
rec.email_pwd = '';
|
||||
rec.telegram_key = '';
|
||||
rec.telegram_key_test = '';
|
||||
|
||||
return rec;
|
||||
}
|
||||
return {};
|
||||
|
||||
};
|
||||
|
||||
@@ -632,7 +632,7 @@ UserSchema.statics.findByUsername = async function(idapp, username, alsoemail, o
|
||||
}
|
||||
return ris;
|
||||
}).then((rec) => {
|
||||
if (onlyifVerifiedByAportador) {
|
||||
if (rec && onlyifVerifiedByAportador) {
|
||||
if (tools.getAskToVerifyReg(idapp)) {
|
||||
if (!rec.verified_by_aportador)
|
||||
return null;
|
||||
@@ -1137,7 +1137,7 @@ UserSchema.statics.findByEmail = function(idapp, email, onlyifVerifiedByAportado
|
||||
'email': email,
|
||||
$or: [{deleted: {$exists: false}}, {deleted: {$exists: true, $eq: false}}],
|
||||
}).then((rec) => {
|
||||
if (onlyifVerifiedByAportador) {
|
||||
if (rec && onlyifVerifiedByAportador) {
|
||||
if (tools.getAskToVerifyReg(idapp)) {
|
||||
if (!rec.verified_by_aportador)
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user