xenu_nntp/lib/nntp/tiny/user.py
2024-11-29 19:31:48 -05:00

14 lines
424 B
Python

from nntp.tiny.db import DatabaseTable
from nntp.tiny.passwd import compare
class User(DatabaseTable):
name = 'server_user'
key = 'id'
columns = 'id', 'active', 'username', 'password', 'fullname', 'mail',
def auth(self, password: str):
if self.active is False or or self.password is None or self.password == '':
return False
return compare(password, self.password)