#6434 - SignIn issue_improve-signInLogMethod #1848

Closed
jsegarra wants to merge 65 commits from 6434-improve-signInLog into test
1 changed files with 8 additions and 0 deletions
Showing only changes of commit c4896e5aa4 - Show all commits

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]);