Loading...
 
Skip to main content

Admin Log-in, When using "Use email as username" the username related settings shouldn't be applied

Status
Closed
Subject
Admin Log-in, When using "Use email as username" the username related settings shouldn't be applied
Version
23.x
Category
  • Bug
  • Conflict of two features (each works well independently)
  • Developer Training
  • Easy for Newbie Dev
Feature
User Administration (Registration, Login & Banning)
Resolution status
New
Submitted by
Bernard Sfez / Tiki Specialist
Keep informed
Adrien
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

At tiki-admin.php?page=login , Username, when I enable "Use email as username" some username settings are now hidden (meaning not in use) but they are still applied.

Minimum length
Maximum length
(And may be "Force lowercase")

I created an instance to test and reproduce.
You need to "really" register a user, not using the admin user to create new users.

How to reproduce :

  1. Go to Admin, Control Panels and switch to "Advanced" (to see advanced preferences)
  2. Go to log-in : tiki-admin.php?page=login, Registration & Log in
  3. Enable : Users can register
  4. Disable : Validate new user registrations by email (we don't want to validate email)
  5. Go to : Username and set "Maximum length" to 6
  6. Apply (save)
  7. Use a different browser (check you are not logged), go to the Tiki and register a new user
  8. Try to input more than 6 characters for the username, you will see this error:
    Image
  9. Go back to your previous browser (logged as admin), log-in : tiki-admin.php?page=login, Username
  10. Enable "Use email as username" option
    The parameters Minimum length, Maximum length, (And may be "Force lowercase") will be hidden has not relevant anymore.
  11. Go back to your different browser (check you are not logged)
  12. Create a new user with an email for login (obviously longer than 6 characters).
    You won't see an error on focus
  13. Submit your registration and you will see the error:
    Image


The difference of treatment in the process make me think there is some wrong additional condition that should be cancelled if "Use email as username" is enable.

Solution

In general, when a parent is disabled, children options and parameters should be kept but not applied.
This is critical when children parameters are hidden (accordion).

In this case, if I disabled "Use email as username", the parameters Minimum length, Maximum length
(And may be "Force lowercase") should not be applied (but kept).

Importance
5
Easy to solve?
7
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8001
Created
Wednesday 22 December, 2021 08:13:42 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Saturday 15 January, 2022 10:11:22 UTC


Show PHP error messages