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

web: add option for making user name unique #5620

Merged
merged 13 commits into from May 15, 2024
Merged

web: add option for making user name unique #5620

merged 13 commits into from May 15, 2024

Conversation

davidpanderson
Copy link
Contributor

We currently allow different accounts to have the same user name.
Hence in places where we need to identify users
(sending PMs, blocking users) we have to use numeric IDs,
which means that we have to display them in various places.
This is ugly; I'm not sure why I thought it was a good idea.

Anyway. Add a project.inc option UNIQUE_USER_NAME. If set:

  • it won't let you create an account with a dup name,
    of change your name to a dup
  • it doesn't show user IDs anywhere
  • in places where you specify users, you use names

This is now the default for new projects.
Existing projects - which have lots of duplicate names -
can't use it unless they de-dup their names somehow
(and this might anger users).

Also some minor code cleanup. sprintf() is our friend.

We currently allow different accounts to have the same user name.
Hence in places where we need to identify users
(sending PMs, blocking users) we have to use numeric IDs,
which means that we have to display them in various places.
This is ugly; I'm not sure why I thought it was a good idea.

Anyway.  Add a project.inc option UNIQUE_USER_NAME.  If set:
- it won't let you create an account with a dup name,
    of change your name to a dup
- it doesn't show user IDs anywhere
- in places where you specify users, you use names

This is now the default for new projects.
Existing projects - which have lots of duplicate names -
can't use it unless they de-dup their names somehow
(and this might anger users).

Also some minor code cleanup.  sprintf() is our friend.
make show_user() (for user search results) overrideable by project.

modernize default show_user()
@davidpanderson davidpanderson marked this pull request as draft May 8, 2024 22:30
define SHOW_USER_FILENAME to specify your user page
@davidpanderson davidpanderson marked this pull request as ready for review May 8, 2024 22:43
@cwallbaum
Copy link

So when there's new projects on the horizon and others are faster than me, it can easily happen that at project x I'm walli, at project y woofy and at z I'll have to become Chewbacca?! Sorry, but that's exactly what I find ugly. With this new default setting, you now have even fewer options to recognize me across different projects than with the old standard behaviour. And if I wanted to have different usernames, that was already possible before, now I'm more or less forced to that situation (as far as new project admins are unaware of this setting)... I don't like it and I'm in favour of not merging this pull request or at least please don't set this behaviour as the new default.

@davidpanderson
Copy link
Contributor Author

Currently, when you specify a user (e.g. to send a PM to several users) you enter their user name.
But if it's not unique you have to enter their database ID instead.
(How do you know if the name is unique? Trial and error.)

So everywhere we show a user name we need to show their database ID too, like 'John (33)'.
But you can also have 'John (33)' as a user name.

This is a mess. There should be one and only one way to identify a user.

Having the same name across projects is fine,
but it doesn't accomplish much if there are other users with the same name on some of the projects.

@AenBleidd AenBleidd linked an issue May 15, 2024 that may be closed by this pull request
@AenBleidd AenBleidd added this to the Server Release 1.6.0 milestone May 15, 2024
@AenBleidd AenBleidd merged commit 308bac6 into master May 15, 2024
100 checks passed
@AenBleidd AenBleidd deleted the dpa_unique_name branch May 15, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Require unique username
3 participants