mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix user field bug
This commit is contained in:
parent
18cc952f8e
commit
3b3bfe39f9
@ -295,6 +295,9 @@ func GetSessionForUser(owner string, offset, limit int, field, value, sortField,
|
||||
}
|
||||
if field != "" && value != "" {
|
||||
if filterField(field) {
|
||||
if offset != -1 {
|
||||
field = fmt.Sprintf("a.%s", field)
|
||||
}
|
||||
session = session.And(fmt.Sprintf("%s like ?", util.SnakeString(field)), fmt.Sprintf("%%%s%%", value))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user