Skip to content

Commit 7e9a929

Browse files
Lei DaRader
authored andcommitted
use uuid from csghub_server db when update casdoor user
1 parent a360711 commit 7e9a929

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

user/component/user.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ func (c *userComponentImpl) Update(ctx context.Context, req *types.UpdateUserReq
268268
}
269269

270270
//skip casdoor update if it's not a casdoor user
271-
if req.UUID == nil || user.RegProvider != "casdoor" {
271+
if user.UUID == "" || user.RegProvider != "casdoor" {
272272
return nil
273273
}
274+
req.UUID = &user.UUID
274275
err = c.updateCasdoorUser(req)
275276
if err != nil {
276277
newError := fmt.Errorf("failed to update casdoor user '%s',error:%w", req.Username, err)

0 commit comments

Comments
 (0)