From ac1ee887205d068b7b1c1df690f157dda506e419 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 23 Mar 2015 16:22:21 +0100 Subject: Reorder and restyle alert messages. Fixed bug in AuthUser(). Remove some unnecessary CSS. --- server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server.go') 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.") } -- cgit v1.2.3