Преглед изворни кода

Update UserModel.class.php

star7th пре 8 година
родитељ
комит
b3eed52289
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      server/Application/Api/Model/UserModel.class.php

+ 5 - 1
server/Application/Api/Model/UserModel.class.php

@@ -45,4 +45,8 @@ class UserModel extends BaseModel {
         $where=array($username,$password,$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()));
+    }
+}