diff --git a/lib/user.js b/lib/user.js index 9c8a907..bcc7666 100644 --- a/lib/user.js +++ b/lib/user.js @@ -100,15 +100,15 @@ class User { } } - async get_perms(user_id) { - return await Mysql.execute( - ` - SELECT ${getPermFields()} FROM nt_perm - WHERE deleted=0 - AND nt_user_id = ?`, - [user_id], - ) - } + // async get_perms(user_id) { + // return await Mysql.execute( + // ` + // SELECT ${getPermFields()} FROM nt_perm + // WHERE deleted=0 + // AND nt_user_id = ?`, + // [user_id], + // ) + // } generateSalt(length = 16) { const chars = Array.from({ length: 87 }, (_, i) => @@ -152,23 +152,12 @@ class User { return false } - - async getSession(sessionId) { - let query = `SELECT s.* - FROM nt_user_session s - LEFT JOIN nt_user u ON s.nt_user_id = u.nt_user_id - WHERE u.deleted=0 - AND s.nt_user_session = ?` - - const session = await Mysql.execute(query, [sessionId]) - if (this.debug) console.log(session) - return session[0] - } } module.exports = new User() module.exports._mysql = Mysql +/* function getPermFields() { return ( `nt_perm.` + @@ -200,3 +189,4 @@ function getPermFields() { ].join(`, nt_perm.`) ) } +*/ \ No newline at end of file