Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Usernames on drupal can contain spaces; however many users are used to sites that don't allow spaces in usernames. That spaces are permitted should be signalled to the user; otherwise they won't realize and won't get the benefit.
On the user account page, the Username field has the following help text beneath it:
'Your preferred username; punctuation is not allowed except for periods, hyphens, and underscores.'
I suggest this be changed to:
'Your preferred username; spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'
Comment | File | Size | Author |
---|---|---|---|
#25 | username_wording-3.patch | 808 bytes | Pancho |
#22 | username_wording-2.patch | 969 bytes | keith.smith |
#7 | username_wording.patch | 808 bytes | ChrisKennedy |
#4 | user_username_wording.patch | 765 bytes | StevenPatz |
Comments
Comment #1
ChrisKennedy CreditAttribution: ChrisKennedy commentedSee the discussion at http://drupal.org/node/45453 for why it is the way it is.
Comment #2
StevenPatzComment #3
joachim CreditAttribution: joachim commentedI appreciate that finding the right wording is a very difficult task, but something is missing from the text as it stands: further improvement is needed. Users do not assume they can use spaces and the help text should mention it.
That other issue mentioned is closed, and so I am reopening this one.
Comment #4
StevenPatzhere's a patch for 6.x
Comment #5
Michelle+1 from me. I read that other discussion and it didn't look to me like they intentionally left out the spaces possibility to me. It looks more like it got lost in the shuffle. If I missed a comment that addresses it, feel free to point that out.
Michelle
Comment #6
ChrisKennedy CreditAttribution: ChrisKennedy commentedI think it could be tweaked a bit to flow better.
What about:
"Your preferred username. Spaces are allowed, but punctuation is not allowed except for periods, hyphens, and underscores."
or even removing the first unnecessary part:
"Spaces are allowed, but punctuation is not allowed except for periods, hyphens, and underscores."
or:
"Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores."
I prefer the last option personally.
Comment #7
ChrisKennedy CreditAttribution: ChrisKennedy commentedHere is a patch to change it to "Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores."
This is also the description for the field on the new installation setup page.
Comment #8
mfer CreditAttribution: mfer commentedWhat about cases where a rule has been setup (admin/user/rules) to not allow spaces or some other normally allowed punctuation?
If we are going to correct this is there a way where someone can easily change this wording to accommodate any rules they may have setup?
Comment #9
ChrisKennedy CreditAttribution: ChrisKennedy commentedIn that case you can change the string via locale.module or with a custom module that uses hook_node_alter.
Comment #10
ChrisKennedy CreditAttribution: ChrisKennedy commentedBtw, the easiest way to override this string is to use the fast translation functionality of settings.php as introduced by http://drupal.org/node/131061
Comment #11
Freso CreditAttribution: Freso commentedFWIW, I don't think the bit with
should be removed. Possibly reworded, but not removed. I'm too tired for proper argumentation right now, and might even disagree with this statement after having slept on it. But there you go.Comment #12
ChrisKennedy CreditAttribution: ChrisKennedy commentedThe title of the field is already "Username", therefore "Your preferred username" is not adding anything helpful.
Comment #13
webchickMoving to the documentation component, to maybe get the docs team looking at this.
Comment #14
catchThis looks good, although there's a patch somewhere in the queue to allow for ' in usernames.
Comment #15
catchdidn't mean to set to needs work, sorry.
Comment #16
Gábor HojtsyHaving this right for any kind of site as the access rules are possible to override does not look cleanly possible. Or anyone has ideas for incorporating the data as set on the site (as in the allowed HTML elements for example on the input format help)?
Comment #17
PanchoThe argument, that the rules may be overridden, holds not only for spaces but for any other character as well.
This is IMHO a serious flaw that I'd like to have generically fixed, if we just had a little more time.
The most we can do for now seems to be:
Comment #18
keith.smith CreditAttribution: keith.smith commentedRerolling to remove 69 lines of offset.
I would note that if this patch were to be applied, it would clear up an inconsistency.
In the installer, the description for the Username field uses the same language proposed by this patch:
Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.
However, user.module uses:
Your preferred username; punctuation is not allowed except for periods, hyphens, and underscores.
Comment #19
PanchoHope I was clear enough in #17 that I support this patch. There is no reason not to RTBC it.
The two other points I made are related to a reasonable throw-in by mfer in #8 and Gabor in #16. Might be better to open up another issue for that though, as I guess this would take some weeks to get fixed.
Comment #20
PanchoFor the additional issues about communicating access rules to the registrant, I just created the new issue #200789.
Comment #21
Gábor HojtsyKeith, you did not attach your reroll.
Comment #22
keith.smith CreditAttribution: keith.smith commentedNew (or rather, old) patch attached.
(As an aside, I am 100% certain that I attached a patch to my comment in #18, since I looked at it later. And, surely there was a patch there when Pancho set it to RTBC in #19 thirty minutes later. However, I get a file not found error if I do a
wget http://drupal.org/files/issues/username_wording-2.patch
(before submitting this followup). Perhaps there is some strange edge case here that eats comment attachments. Or, perhaps I'm just losing it. Either explanation is plausible.)Comment #23
keith.smith CreditAttribution: keith.smith commentedAnd, to be sure, there is a patch.
Comment #24
keith.smith CreditAttribution: keith.smith commentedPatch still there. Actually, I just realized that Pancho had set this to RTBC.
Comment #25
PanchoJust cosmetics: stripped the first 7 lines of ignored files. Remains RTBC.
Comment #26
Gábor HojtsyThanks, committed.
Comment #27
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.