The following flask function with its decorator apparently loads a given user_id into the flask_session.
I was wondering from where does this function get the user_id? Is it from the login_user(email, '....') method or UserMixin class? I read somewhere that the login_user() calls the get_id() or is_active from the UserMixin. Is this correct?
I'd also like to know how these three, (decorator, login_user, UserMixin) are related to each other.
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))