Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Mar 2011 at 01:51 UTC
Updated:
29 Jul 2014 at 19:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
nyirocsaba commentedI've replicated the reported issue and after applying the patch it worked fine.
P.S.: We're at the "Drupal Debreceni Napok 2011" ( Drupal Days in Debrecen) and we tested this patch together.
Comment #2
nyirocsaba commentedThis patch really solved this issue, but created other new issues, like:
- on the People ( admin/people ) page "Anonymous" is listed as username instead of "0"
My suggestion is to don't allow to create a user with "0" as name.
Comment #3
robertom commentedSorry for my bad english
@nyirocsaba: thanks for pointing that out.
I have rerolled patch with fix for incorrect "Anonymous" username.
Yes, this could be an options, but I think the problem is more general...
there are other incorrect use of empty() functions also in other modules (core/contrib).
The "0" string inserted in an input text field of a form, is a correct value, but empty() function don't address that
Comment #4
robertom commentedrerolled with username "0" test validation.
Comment #5
nyirocsaba commented@robertom Y're welcome. Your english is ok.
Y're right and I agree with you. I'm open to do more tests and find out if the patch is causing issues on other places too and I'll let you know if I find anything.
Attached are two screenshots where it's listed "Anonymous" instead of "0":
article-0-username.png - Article author on the front-end
article-0-username-admin.png - Article author on the admin
Comment #6
robertom commentedThanks for that.
Attached the re-rolled patch.
I have filled also a similar issue for role: #1107408: explicitly check if role name is filled
and a task addressed to 8.x (but I don't know if this is the correct path) for this type of problem #1107424: take care on use empty() construct (string "0" is an edge case)
Comment #7
wouters_f commentedSame problem here.
http://drupal.org/node/1107408
Comment #8
robertom commentedSetted priority to minor, because is really minor
Comment #9
Bathie commentedHello, I tested the patch on drupal.7.x-dev and thats works well.
Comment #10
droplet commentedComment #11
damien tournoud commentedSee #845472: Robustly determine when strings are empty.