18 lines
631 B
Python
18 lines
631 B
Python
from data import model
|
|
|
|
class DatabaseUsers(object):
|
|
def verify_credentials(self, username_or_email, password):
|
|
""" Simply delegate to the model implementation. """
|
|
result = model.user.verify_user(username_or_email, password)
|
|
if not result:
|
|
return (None, 'Invalid Username or Password')
|
|
|
|
return (result, None)
|
|
|
|
def verify_and_link_user(self, username_or_email, password):
|
|
""" Simply delegate to the model implementation. """
|
|
return self.verify_credentials(username_or_email, password)
|
|
|
|
def confirm_existing_user(self, username, password):
|
|
return self.verify_credentials(username, password)
|
|
|