diff --git a/openedx/core/djangoapps/user_api/accounts/__init__.py b/openedx/core/djangoapps/user_api/accounts/__init__.py index caf78ca54a..faed01a6bb 100644 --- a/openedx/core/djangoapps/user_api/accounts/__init__.py +++ b/openedx/core/djangoapps/user_api/accounts/__init__.py @@ -14,7 +14,7 @@ NAME_MIN_LENGTH = 1 NAME_MAX_LENGTH = 255 # The minimum and maximum length for the username account field -USERNAME_MIN_LENGTH = 2 +USERNAME_MIN_LENGTH = getattr(settings, 'USERNAME_MIN_LENGTH', 2) # Note: 30 chars is the default for historical reasons. Django uses 150 as the username length since 1.10 USERNAME_MAX_LENGTH = getattr(settings, 'USERNAME_MAX_LENGTH', 30)