Skip to content

Commit faf888d

Browse files
stoorxStoorx
authored andcommitted
feat: Make USERNAME_MIN_LENGTH customizable
1 parent 1a081f2 commit faf888d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)