mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
Fix get null object bug.
This commit is contained in:
@ -78,6 +78,10 @@ func GetUsers(owner string) []*User {
|
||||
}
|
||||
|
||||
func getUser(owner string, name string) *User {
|
||||
if owner == "" || name == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
user := User{Owner: owner, Name: name}
|
||||
existed, err := adapter.Engine.Get(&user)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user