revert merge from dev

This commit is contained in:
Javier Segarra 2023-11-28 11:57:02 +01:00
parent cbcc2ba17c
commit c4896e5aa4
1 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,14 @@ module.exports = function(Self) {
return email.send();
});
/**
* Sign-in validate. *
* @param {Integer} user The user
* @param {Object} userToken Options
* @param {Object} token accessToken
* @param {Object} ctx context
*/
Self.signInValidate = async(user, userToken, token, ctx) => {
const [[key, value]] = Object.entries(Self.userUses(user));
const isOwner = Self.rawSql(`SELECT ? = ? `, [userToken[key], value]);