mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: suggested username should not be more than setting max_username_length
This commit is contained in:
parent
7cf0f39066
commit
bb0fa5abbc
@ -28,7 +28,7 @@ module UserNameSuggester
|
|||||||
i += 1
|
i += 1
|
||||||
end
|
end
|
||||||
until attempt == allow_username || User.username_available?(attempt) || i > 200
|
until attempt == allow_username || User.username_available?(attempt) || i > 200
|
||||||
attempt = SecureRandom.hex[0..SiteSetting.max_username_length]
|
attempt = SecureRandom.hex[1..SiteSetting.max_username_length]
|
||||||
i += 1
|
i += 1
|
||||||
end
|
end
|
||||||
attempt
|
attempt
|
||||||
|
Loading…
Reference in New Issue
Block a user