MCPcopy Create free account
hub / github.com/EhsanTang/ApiManager / getUser

Method getUser

api/src/main/java/cn/crap/utils/Tools.java:517–521  ·  view source on GitHub ↗

获取用户登录信息 @return

()

Source from the content-addressed store, hash-verified

515 * @return
516 */
517 public static LoginInfoDto getUser(){
518 ICacheService cacheService = SpringContextHolder.getBean("cacheService", CacheService.class);
519 String uId = MyCookie.getCookie(Const.COOKIE_USERID, false, Tools.getRequest());
520 return (LoginInfoDto) cacheService.getObj(Const.CACHE_USER + uId);
521 }
522
523 public static boolean checkUserName(String userName){
524 String regex = "^[0-9A-Za-z-_\\.]{5,20}$";

Callers 15

hasPermissionMethod · 0.95
isPrivateProjectMethod · 0.95
hasAuthMethod · 0.95
preLoginMethod · 0.95
sendValidateEmailMethod · 0.95
addOrUpdateMethod · 0.95
addOrUpdateMethod · 0.95
listMethod · 0.95
addOrUpdateMethod · 0.95
menuMethod · 0.95
addOrUpdateMethod · 0.95
listMethod · 0.95

Calls 4

getBeanMethod · 0.95
getCookieMethod · 0.95
getRequestMethod · 0.95
getObjMethod · 0.95

Tested by

no test coverage detected