diff --git a/user/models.py b/user/models.py index 263d5a2..74b93e9 100644 --- a/user/models.py +++ b/user/models.py @@ -18,7 +18,7 @@ def start_session(self, user): # del user['_id'] user['_id'] = str(user['_id']) session['logged_in'] = True - session['user'] = user + sessiostart_sessionn['user'] = user return jsonify(user), 200 # create new user @@ -53,6 +53,7 @@ def login(self, db): } user = db.users.find_one({'email':request.form.get('email')}) if user and pbkdf2_sha256.verify(request.form.get('password'), user['password']): + print(user["name"], "logged in") return self.start_session(user) # If this is reached something wrong Happened