jgermade/user-model

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/jgermade/user-model

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

This package is not auto-updated.

Last update: 2026-01-03 23:14:02 UTC


README

UserModel - Provides an automated method to access user data.

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

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License.

=======

How to use
require("UserModel.php");
$user = new UserModel();

if( $user->isLogged() ) {

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

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