summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-02-03 07:33:43 -0500
committerJoram Wilander <jwawilander@gmail.com>2016-02-03 07:33:43 -0500
commit4a09adeb391b23c7e850fec96a2e8a731b70d755 (patch)
treeca9cc2410dc17de823d923c9e0ff74fea16d2a82 /model/config.go
parentd31ae207389b7402debbcaa40bb691e86023f1ba (diff)
parentb013f02209c7c128a35d1c54f2d4a7d6a9701f72 (diff)
downloadchat-4a09adeb391b23c7e850fec96a2e8a731b70d755.tar.gz
chat-4a09adeb391b23c7e850fec96a2e8a731b70d755.tar.bz2
chat-4a09adeb391b23c7e850fec96a2e8a731b70d755.zip
Merge pull request #1991 from rgarmsen2295/plt-976
PLT-976 Adds ability to sign in with username
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index 5c8604ff1..a6d1c21dc 100644
--- a/model/config.go
+++ b/model/config.go
@@ -97,6 +97,8 @@ type FileSettings struct {
type EmailSettings struct {
EnableSignUpWithEmail bool
+ EnableSignInWithEmail *bool
+ EnableSignInWithUsername *bool
SendEmailNotifications bool
RequireEmailVerification bool
FeedbackName string
@@ -258,6 +260,21 @@ func (o *Config) SetDefaults() {
*o.TeamSettings.EnableTeamListing = false
}
+ if o.EmailSettings.EnableSignInWithEmail == nil {
+ o.EmailSettings.EnableSignInWithEmail = new(bool)
+
+ if o.EmailSettings.EnableSignUpWithEmail == true {
+ *o.EmailSettings.EnableSignInWithEmail = true
+ } else {
+ *o.EmailSettings.EnableSignInWithEmail = false
+ }
+ }
+
+ if o.EmailSettings.EnableSignInWithUsername == nil {
+ o.EmailSettings.EnableSignInWithUsername = new(bool)
+ *o.EmailSettings.EnableSignInWithUsername = false
+ }
+
if o.EmailSettings.SendPushNotifications == nil {
o.EmailSettings.SendPushNotifications = new(bool)
*o.EmailSettings.SendPushNotifications = false