From 2bcedb16987aa75889a7f7091893775d6e58a8dc Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 4 Aug 2015 09:14:08 +0200 Subject: By hoping this closes #9 without adding another bug. --- pyaggr3g470r/models/user.py | 4 ++-- pyaggr3g470r/views/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/models/user.py b/pyaggr3g470r/models/user.py index 0bf9fe04..c3476afc 100644 --- a/pyaggr3g470r/models/user.py +++ b/pyaggr3g470r/models/user.py @@ -59,9 +59,9 @@ class User(db.Model, UserMixin): def get_id(self): """ - Return the id (email) of the user. + Return the id of the user. """ - return self.email + return self.id def set_password(self, password): """ diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index b649d5c6..29b865e0 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -94,9 +94,9 @@ def before_request(): db.session.commit() @login_manager.user_loader -def load_user(email): +def load_user(id): # Return an instance of the User model - return UserController().get(email=email) + return UserController().get(id=id) # -- cgit