From 9115a8d1a73d5f8b61f411b29d0046f19e042746 Mon Sep 17 00:00:00 2001 From: ohko Date: Fri, 11 Sep 2015 09:39:57 +0800 Subject: [PATCH] Fix the deactive user can sign up bug. --- models/login.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/login.go b/models/login.go index 78ce79cff..b53cdbdd9 100644 --- a/models/login.go +++ b/models/login.go @@ -193,6 +193,10 @@ func UserSignIn(uname, passwd string) (*User, error) { if !u.ValidatePassword(passwd) { return nil, ErrUserNotExist{u.Id, u.Name} } + // If not active, return error + if !u.IsActive { + return nil, ErrUserNotExist{u.Id, u.Name} + } return u, nil }