Loading...
 
Skip to main content

max_username_length is enforced but not configurable when we select login_is_email

Status
Open
Subject
max_username_length is enforced but not configurable when we select login_is_email
Version
21.x
24.x
Category
  • Conflict of two features (each works well independently)
Feature
User Administration (Registration, Login & Banning)
Resolution status
New
Submitted by
Jean-Marc Libs
Lastmod by
Jean-Marc Libs
Rating
(0)
Description
  • Tiki lets us configure min_username_length and max_username_length unless we select login_is_email
  • If we select login_is_email, these configs are hidden but max_username_length is still enforced in lib/validators/validator_username.php and in lib/registration/registrationlib.php


The database structure seems to let us have as many as 191 chars without an issue. Certainly these are actually bytes, not chars.
Notes: If we use english logins or emails as logins, it's 191 characters. Accentuated chars in french and other european languages use 2 bytes (éààê). Some other languages use alphabets in which all chars use 2, 3 or 4 bytes.

My suggestion :

  • Important: We should not enforce min_username_length and max_username_length when preference login_is_email is selected.
  • Nice to have: We should still have some hard limit of 191 bytes (not chars) even if login_is_email is selected (needs to be tested with utf8 characters) so that people get a nice explanation instead of a mysql error message about an insert failure.

Importance
5
Easy to solve?
8
Priority
40
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8100
Created
Monday 28 February, 2022 20:55:25 UTC
by Jean-Marc Libs
LastModif
Monday 28 February, 2022 20:55:25 UTC


Show PHP error messages