User Manager #1227
Unanswered
youssefCeres
asked this question in
Q&A
User Manager
#1227
Replies: 1 comment
-
You can just override it: class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
def __init__(
self,
user_db: BaseUserDatabase[models.UP, models.ID],
your_custom_param: str,
password_helper: Optional[PasswordHelperProtocol] = None,
):
super().__init__(user_db, password_helper)
self.your_custom_param = your_custom_param The key afterwards is to modify the async def get_user_manager(user_db=Depends(get_user_db)):
your_custom_param = "FOO"
yield UserManager(user_db, your_custom_param) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
How can I override UserManager constructor params ? I want to work with the asynchronous database ( to perform some actions on other tables after the user gets registered ).
Any hints plz ?
Beta Was this translation helpful? Give feedback.
All reactions