summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index 7e6a6c824f..729f2c0c7e 100644
--- a/models/user.go
+++ b/models/user.go
@@ -418,7 +418,7 @@ func ChangeUserName(u *User, newUserName string) (err error) {
// UpdateUser updates user's information.
func UpdateUser(u *User) error {
- has, err := x.Where("id != ?", u.Id).And("email = ?", u.Email).Get(new(User))
+ has, err := x.Where("id!=?", u.Id).And("email=?", u.Email).Get(new(User))
if err != nil {
return err
} else if has {