Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fullname and first_name/last_name ~interchangeably #678

Open
dehnert opened this issue Mar 28, 2022 · 0 comments · May be fixed by #683
Open

Use fullname and first_name/last_name ~interchangeably #678

dehnert opened this issue Mar 28, 2022 · 0 comments · May be fixed by #683

Comments

@dehnert
Copy link

dehnert commented Mar 28, 2022

Expected behaviour

When the SAML backend supplies a fullname, my Django user should have first_name and last_name set: if fullname is set but not first_name/last_name, PSA should (optionally?) generate a first_name and last_name automatically (my inclination is something like first_name, _space, last_name = fullname.rpartition(' ')). If there are systems (that is, non-Django web frameworks) that want a fullname, it should do the opposite transformation when fullname is missing.

Actual behaviour

My Django user has neither first_name nor last_name.

What are the steps to reproduce this issue?

Input clear steps to reproduce the issue for a maintainer.

  1. Use social_django
  2. Configure the SAML backend to return a fullname, but not a first_name or last_name
  3. Log in using SAML
  4. Observe that the Django user created doesn't have a first_name/last_name set

Any logs, error output, etc?

N/A

Any other comments?

Unfortunate I don't understand how data flows through PSA well enough to supply a patch.

I suspect that this ideally wants to be configurable (on/off and perhaps a custom fullname->first_name/last_name function) per-backend.

dehnert added a commit to dehnert/social-core that referenced this issue May 8, 2022
@dehnert dehnert linked a pull request May 8, 2022 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant