Skip to content

Commit d426866

Browse files
committed
Fix change user type failed return rename bug
1 parent 900ac62 commit d426866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/admin/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func EditUserPost(ctx *context.Context) {
347347
return
348348
}
349349

350-
if form.UserName != "" {
350+
if form.UserName != "" && form.UserName != u.Name {
351351
if err := user_service.RenameUser(ctx, u, form.UserName); err != nil {
352352
switch {
353353
case user_model.IsErrUserIsNotLocal(err):

0 commit comments

Comments
 (0)