MCPcopy Index your code
hub / github.com/TruthHun/BookStack / FindByFieldFirst

Method FindByFieldFirst

models/member.go:317–323  ·  view source on GitHub ↗

根据指定字段查找用户.

(field string, value interface{})

Source from the content-addressed store, hash-verified

315
316//根据指定字段查找用户.
317func (m *Member) FindByFieldFirst(field string, value interface{}) (*Member, error) {
318 o := orm.NewOrm()
319
320 err := o.QueryTable(m.TableNameWithPrefix()).Filter(field, value).OrderBy("-member_id").One(m)
321
322 return m, err
323}
324
325//校验用户.
326func (m *Member) Valid(isHashPassword bool) error {

Callers 1

ValidMethod · 0.45

Calls 1

TableNameWithPrefixMethod · 0.95

Tested by

no test coverage detected