aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/controllers/PM.java3
-rw-r--r--juick-api/src/main/java/com/juick/api/controllers/Users.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/PM.java b/juick-api/src/main/java/com/juick/api/controllers/PM.java
index ffbea4b5..478ca75e 100644
--- a/juick-api/src/main/java/com/juick/api/controllers/PM.java
+++ b/juick-api/src/main/java/com/juick/api/controllers/PM.java
@@ -7,6 +7,7 @@ import com.juick.server.util.HttpForbiddenException;
import com.juick.service.PMQueriesService;
import com.juick.service.UserService;
import com.juick.util.UserUtils;
+import com.juick.util.WebUtils;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -69,7 +70,7 @@ public class PM {
throw new HttpForbiddenException();
}
int uid = 0;
- if (UserUtils.checkUserNameValid(uname)) {
+ if (WebUtils.isUserName(uname)) {
uid = userService.getUIDbyName(uname);
}
diff --git a/juick-api/src/main/java/com/juick/api/controllers/Users.java b/juick-api/src/main/java/com/juick/api/controllers/Users.java
index d6035cf2..78f6175f 100644
--- a/juick-api/src/main/java/com/juick/api/controllers/Users.java
+++ b/juick-api/src/main/java/com/juick/api/controllers/Users.java
@@ -68,7 +68,7 @@ public class Users {
if (uname == null) {
uid = vuid;
} else {
- if (UserUtils.checkUserNameValid(uname)) {
+ if (WebUtils.isUserName(uname)) {
com.juick.User u = userService.getUserByName(uname);
if (u != null && u.getUid() > 0) {
uid = u.getUid();
@@ -102,7 +102,7 @@ public class Users {
if (uname == null) {
uid = vuid;
} else {
- if (UserUtils.checkUserNameValid(uname)) {
+ if (WebUtils.isUserName(uname)) {
com.juick.User u = userService.getUserByName(uname);
if (u != null && u.getUid() > 0) {
uid = u.getUid();