Skip to content

Commit 961a054

Browse files
zhengrenjiegmessner
authored andcommitted
updateUser bug (#196)
* fix update user bug. `skip_confirmation` should be `skip_reconfirmation` when updating user.
1 parent 0bfdb38 commit 961a054

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/gitlab4j/api/UserApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ Form userToForm(User user, Integer projectsLimit, CharSequence password, Boolean
842842
}
843843
}
844844
projectsLimit = (projectsLimit == null) ? user.getProjectsLimit() : projectsLimit;
845+
String skipConfirmationFeildName = create ? "skip_confirmation" : "skip_reconfirmation";
845846

846847
return (new GitLabApiForm()
847848
.withParam("email", user.getEmail(), create)
@@ -861,7 +862,7 @@ Form userToForm(User user, Integer projectsLimit, CharSequence password, Boolean
861862
.withParam("location", user.getLocation(), false)
862863
.withParam("admin", user.getIsAdmin(), false)
863864
.withParam("can_create_group", user.getCanCreateGroup(), false)
864-
.withParam("skip_confirmation", user.getSkipConfirmation(), false)
865+
.withParam(skipConfirmationFeildName, user.getSkipConfirmation(), false)
865866
.withParam("external", user.getExternal(), false)
866867
.withParam("shared_runners_minutes_limit", user.getSharedRunnersMinutesLimit(),false));
867868
}

0 commit comments

Comments
 (0)