summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.go b/server.go
index 9c20797..dc95c51 100644
--- a/server.go
+++ b/server.go
@@ -66,9 +66,13 @@ func ChangePassword(email, oldPassword, newPassword string) error {
vU := VirtualUser{Email: email, Password: oldPassword}
if !vU.AuthUser() {
- return errors.New("User/password does not match.")
+ return errors.New("User/Password do not match.")
}
+ vD := VirtualDomain{}
+ vD.Name = GetDomain(email)
+ vU.DomainId = vD.GetPrimaryKey()
+
if !vU.UpdatePassword(newPassword) {
return errors.New("There was an error.")
}