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

[Question] How to tell if a user was created or existing #701

Closed
cridenour opened this issue Aug 1, 2015 · 1 comment
Closed

[Question] How to tell if a user was created or existing #701

cridenour opened this issue Aug 1, 2015 · 1 comment

Comments

@cridenour
Copy link

I apologize if I missed this somewhere in the docs or code - but does there currently exist a way to tell if the user that is returned through do_auth is an existing or new user? I currently use do_auth to generate a token using DRF and would like to return 201 if they are new. I could set up a signal for any server side code but it would be nice to let the client know as well.

Thanks!

@cridenour
Copy link
Author

Guess I'll answer it myself - the user returned by do_auth can be check by the attribute

user.is_new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant