Forráskód Böngészése

Update UserModel.class.php

star7th 8 éve
szülő
commit
e2dcb8f1a8
1 módosított fájl, 5 hozzáadás és 2 törlés
  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);
         $where=array($username,$password);
         return $this->where("username='%s' and password='%s'",$where)->find();
         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()));
+    }
+}