jgermade/user-model

Maintainers

Package info

github.com/jgermade/UserModel

pkg:composer/jgermade/user-model

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

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

This package is not auto-updated.

Last update: 2026-04-12 00:34:44 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" ]);
  
}