Fix credentials first time

pull/144/head
Henrique Dias 2017-07-18 16:36:08 +01:00
parent 0ae8aa5e19
commit c2ccc4f6b8
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
1 changed files with 6 additions and 3 deletions

View File

@ -223,9 +223,12 @@ func New(database string, base User) (*FileManager, error) {
// Attaches db to this File Manager instance.
m.db = db
base.Username = ""
base.Password = ""
m.DefaultUser = &base
// Create the default user, making a copy of the base.
u := base
u.Username = ""
u.Password = ""
m.DefaultUser = &u
return m, nil
}