diff options
-rw-r--r-- | core.go | 4 | ||||
-rw-r--r-- | fetcher.go | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -162,6 +162,10 @@ func (ctx *Context) getPassword(cached bool) (err error) { return } +func (ctx *Context) CheckPassword() (bool, error) { + return ctx.db.CheckPassword(ctx.UserName, ctx.Password) +} + func (ctx *Context) getGroupOfCart() (err error) { ctx.GroupName, err = ctx.db.GetGroupOfCart(ctx.Cart) return @@ -259,7 +259,7 @@ func fetcherInit() { func checkPassword(ctx *Context, result *Result) (err error) { ok := false - if ok, err = ctx.db.CheckPassword(ctx.UserName, ctx.Password); err != nil { + if ok, err = ctx.CheckPassword(); err != nil { return } if !ok { |