Skip to content

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 alexeyabel#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 https://github.com/PanCakeConnaisseur/user_backend_sql_raw/pull/57 and https://github.com/PanCakeConnaisseur/user_backend_sql_raw/pull/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