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

Support setting the uid from the query #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AVee
Copy link

@AVee AVee commented Sep 14, 2024

Extend the get_password_hash_for_user query to allow it to return the uid as well. This makes it possible to support normalizing usernames, using email as username and other types of mapping in the query.

Probably deals with #56

I personally needed this to support both username and email as login without nextcloud creating separate accounts for 'user' and 'user@domain'. There certainly are different ways to solve this, I choose to use the optional second column in get_password_hash_for_user as that would be backwards compatible with exiting configurations. But a specific configuration for this could also be an option.

The checkPassword function is intended to be used this way, see https://github.com/nextcloud/server/blob/master/lib/public/User/Backend/ICheckPasswordBackend.php

Extend the get_password_hash_for_user query to allow it to return the
uid as well. This makes it possible to support normalizing usernames,
using email as username and other types of mapping in the query.

Probably deals with PanCakeConnaisseur#56
@AVee
Copy link
Author

AVee commented Sep 16, 2024

Looking at the other open pull requests, I think this would allow doing what @Stratop0w is trying to do in #57 and #58 in sql query.

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

Successfully merging this pull request may close these issues.

1 participant