Use only the email address for git user-drupal user relation
dhax - June 21, 2009 - 21:51
| Project: | Version Control API -- Git backend |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Right now, the backend uses the full Git username and email to determine whether to attribute a git commit with a Drupal user. Since the username part of the Git commit can vary, it would be more reliable to use only the email address, and include the username only for display purposes.

#1
In order to assign the uid to an operation, Version Control API looks up if any username in {versioncontrol_accounts} matches the one given in $operation['username']. That means if the latter does not match the stored username, the corresponding Drupal user won't be found. So having the email as unique identifier (username) for the account makes a lot of sense.