django-saml2-auth icon indicating copy to clipboard operation
django-saml2-auth copied to clipboard

Creating user with custom function

Open matiszz opened this issue 2 years ago • 2 comments

Hi, thanks a lot for this library! I was wondering if there is any way of creating a user with my own function. I've seen that the function create_new_user creates the User with the code:

user = user_model.objects.create_user(email, first_name=firstname, last_name=lastname)

But my User model has attributes name and surname instead of first_name and last_name.

It'd be interesting to be able to provide our own function to create it. Is there a way rn? Thanks a lot!

matiszz avatar Jun 02 '22 16:06 matiszz

@matiszz This feature doesn't exist yet. Feel free to open a PR and introduce it! 🙏 I'd be happy to review it.

mostafa avatar Jun 07 '22 12:06 mostafa

@mostafa I have created a PR for this issue can you check it ? if is there any issues related any thing let me know about it. I would love to resolve it.

UraizAli avatar Aug 12 '22 17:08 UraizAli

@matiszz Thanks for raising the issue. @UraizAli Thanks for your contribution. I fixed the issues on your PR in a separate one and merged it:

  • https://github.com/grafana/django-saml2-auth/pull/93

mostafa avatar Oct 11 '22 13:10 mostafa