Skip to content

Commit 7023d76

Browse files
authored
Merge pull request #37289 from Stoorx/customizable-username-min-length
feat: Make `USERNAME_MIN_LENGTH` customizable
2 parents 5df4564 + faf888d commit 7023d76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openedx/core/djangoapps/user_api/accounts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
NAME_MAX_LENGTH = 255
1515

1616
# The minimum and maximum length for the username account field
17-
USERNAME_MIN_LENGTH = 2
17+
USERNAME_MIN_LENGTH = getattr(settings, 'USERNAME_MIN_LENGTH', 2)
1818
# Note: 30 chars is the default for historical reasons. Django uses 150 as the username length since 1.10
1919
USERNAME_MAX_LENGTH = getattr(settings, 'USERNAME_MAX_LENGTH', 30)
2020

0 commit comments

Comments
 (0)