aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/user.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
commit83081ad7e488c44757e43ff40e83458a2e1451ed (patch)
tree176b04327df88b899aa4172aa30d042a0e43b32a /src/web/controllers/user.py
parentUseless if no category set. (diff)
downloadnewspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.gz
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.bz2
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.zip
begin integration of the new architecture
Diffstat (limited to 'src/web/controllers/user.py')
-rw-r--r--src/web/controllers/user.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/controllers/user.py b/src/web/controllers/user.py
index ae169b05..ee2eb4c2 100644
--- a/src/web/controllers/user.py
+++ b/src/web/controllers/user.py
@@ -1,6 +1,6 @@
import random
import hashlib
-from werkzeug import generate_password_hash
+from werkzeug import generate_password_hash, check_password_hash
from .abstract import AbstractController
from web.models import User
@@ -15,6 +15,9 @@ class UserController(AbstractController):
elif 'password' in attrs:
del attrs['password']
+ def check_password(self, user, password):
+ return check_password_hash(user.pwdhash, password)
+
def create(self, **attrs):
self._handle_password(attrs)
return super().create(**attrs)
bgstack15