Package com.wordpress.domain

Examples of com.wordpress.domain.User


   *
   * @param request
   * @return
   */
  public String getLoginUserName(HttpServletRequest request) {
    User admin = userService.chklogin(request);
    if (admin != null)
      return admin.getUser_login();
    else
      return "";
  }
View Full Code Here


  @RequestMapping("/admin/wp-login.do")
  public String login(HttpServletRequest request,
      HttpServletResponse response, Map<String, Object> model) {
    Row row = RequestUtil.getParam(request, Constant.SEPARATOR);
    System.out.println(row);
    User user = userService.login(row);
    String url="";
    if(null == user){
      url="/wp-login.vm";
    }else{
      request.getSession().setAttribute("admin", user);
View Full Code Here

      return userDao.getOne(row.get("user_login", ""));
    return null;
  }
 
  public User login(Row row){
    User user = getOne(row);
    if(user != null && row.get("user_pass","").equals(user.getUser_pass())){
      return user;
    }
    return null;
  }
View Full Code Here

 
  /*
   * �ж��û��Ƿ��Ѿ���¼
   */
  public User chklogin(HttpServletRequest request) {
    User admin = (User) request.getSession().getAttribute("admin");

    String name = "";

    User record = null;

    if (admin != null) { // session�в������û���Ϣ
      record = new User();
      name = admin.getUser_login();
      if (!StringUtil.isEmpty(name))
        record.setUser_login(name);
    } else { // �ж�Cookie���Ƿ�����û���Ϣ
      record = new User();
      name = RequestUtil.getValue(request, "adminname");
      if (!StringUtil.isEmpty(name))
        return null;
      record.setUser_login(JavascriptEscape.unescape(name));
    }
    return record;
  }
View Full Code Here

TOP

Related Classes of com.wordpress.domain.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.