lyleshaw commented on code in PR #11255:
URL: https://github.com/apache/dolphinscheduler/pull/11255#discussion_r945478853
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -203,23 +198,23 @@ public User createUser(String userName,
String phone,
String queue,
int state) {
- User user = new User();
Date now = new Date();
+ checkUserParams(userName, userPassword, email, phone);
+
+ User tempUser = userMapper.queryByUserNameAccurately(userName);
+ if (tempUser != null) {
+ throw new ServiceException(Status.NAME_EXIST, userName);
+ }
Review Comment:
> Why we should add this check, BTW?
to avoid userName duplicate?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]