summaryrefslogtreecommitdiffstats
path: root/model/user.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-04-28 23:01:56 +0100
committerCorey Hulen <corey@hulen.com>2017-04-28 15:01:56 -0700
commit6f6b7e4e97f466ee0f29c96b7fee0d9b98ce751c (patch)
treec45e87929309d361f36d8afdf5afaac2b4f38c14 /model/user.go
parent96906482cecb0df21c8e1a40a2ba00c13c0182a7 (diff)
downloadchat-6f6b7e4e97f466ee0f29c96b7fee0d9b98ce751c.tar.gz
chat-6f6b7e4e97f466ee0f29c96b7fee0d9b98ce751c.tar.bz2
chat-6f6b7e4e97f466ee0f29c96b7fee0d9b98ce751c.zip
Add Password field to Bulk Importer. (#6268)
Diffstat (limited to 'model/user.go')
-rw-r--r--model/user.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/model/user.go b/model/user.go
index f983139f9..48d85526d 100644
--- a/model/user.go
+++ b/model/user.go
@@ -36,6 +36,7 @@ const (
USER_AUTH_DATA_MAX_LENGTH = 128
USER_NAME_MAX_LENGTH = 64
USER_NAME_MIN_LENGTH = 1
+ USER_PASSWORD_MAX_LENGTH = 72
)
type User struct {
@@ -130,7 +131,7 @@ func (u *User) IsValid() *AppError {
return InvalidUserError("auth_data_pwd", u.Id)
}
- if len(u.Password) > 72 {
+ if len(u.Password) > USER_PASSWORD_MAX_LENGTH {
return InvalidUserError("password_limit", u.Id)
}