-
I have a user model where def get_fs_uniquifier(self):
return self.id ...and use preexisting column instead of the additional Should I expect any ill side-effects? Do I need to add any extra code for Flask-Login? E.g. from https://github.com/Flask-Middleware/flask-security/issues/312 def install_user_loader(app):
'''In order to handle non-standard id column name'''
with app.app_context():
security = app.extensions['security']
@app.login_manager.user_loader
def user_loader(user_id):
return security.datastore.find_user(user_id=user_id) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I would strongly suggest you not do this - main reason - you won't be able to reset any security attributes - including changing password. It also ties the existence of a user to their security attributes which is unlikely to be what users expect |
Beta Was this translation helpful? Give feedback.
I would strongly suggest you not do this - main reason - you won't be able to reset any security attributes - including changing password. It also ties the existence of a user to their security attributes which is unlikely to be what users expect