jgermade/user-model

dev-master 2015-03-06 08:22 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:12:36 UTC


README

UserModel - 提供了一种自动访问用户数据的方法。

版权 (C) 2014 Jesús Manuel Germade Castiñeiras

本程序是自由软件:您可以按照自由软件基金会发布的GNU通用公共许可证的条款重新分配和/或修改它,许可证版本为3。

=======

如何使用
require("UserModel.php");
$user = new UserModel();

if( $user->isLogged() ) {

  echoJSON([ "items" => $user->model("items")->get() ]);
  
} else {

  http_response_code(403);
  echoJSON([ "error" => "unauthorized" ]);
  
}