소스 검색

Update UserModel.class.php

star7th 8 년 전
부모
커밋
e2dcb8f1a8
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      Application/Home/Model/UserModel.class.php

+ 5 - 2
Application/Home/Model/UserModel.class.php

@@ -45,5 +45,8 @@ class UserModel extends BaseModel {
         $where=array($username,$password);
         return $this->where("username='%s' and password='%s'",$where)->find();
     }
-    
-}
+    //设置最后登录时间
+    public function setLastTime($uid){
+        return $this->where("uid='%s'",array($uid))->save(array("last_login_time"=>time()));
+    }
+}