TABLE OF CONTENTS
Download & License |
Installation |
What Is This? |
User Database |
User Functions |
User API |
DOWNLOAD & LICENSE
Download Core Boxx Users Module | Source Forge
Core Boxx is released under the MIT License. You are free to use it for your own personal and commercial projects, modify it as you see fit. On the condition that there the software is provided “as-is”. There are no warranties provided and “no strings attached”. Code Boxx and the authors are not liable for any claims, damages, or liabilities.
INSTALLATION
Download and set up the “main Core Boxx” if you have not already done so. Then, create your database and import users.sql
… Remember to delete this file afterward, that’s all.
WHAT IS THIS MODULE?
This is a simple user’s module for Core Boxx – With a predefined user table, library, and API. Simply plug this one into Core Boxx, and you get a user system out-of-the-box… Minus the HTML/CSS/Javascript, that is.
THE USER TABLE
Field | Description |
user_id |
Primary key. The user ID. |
user_name |
The user’s name. |
user_email |
The user’s email address, unique to prevent multiple registrations. |
user_password |
The user’s password. |
USER LIBRARY FUNCTIONS
Function | Description & Quick Example |
save($name, $email, $password, $id) |
Add a new user, or update an existing user.
|
del($id) |
Deletes a user.
|
get($id) |
Get a user by ID or email.
|
search($search) |
Search for a user by email or name.
|
getAll() |
Get all users.
|
verify($email, $password, $session) |
Verify the given email and password, mostly used for security checks and login sequence.
|
USER API FUNCTIONS
Accessible at http://yoursite.com/api/users/REQUEST/
and http://yoursite.com/api/session/REQUEST/
. These are pretty much a replica of the above library functions, except in REST API format. Feel free to delete api/users.php
if you don’t intend to integrate an API.
Request | Description & Parameters |
get |
Get a user by ID or email.
|
getAll |
Get all users. |
search |
Search users by name or email.
|
save |
Add or update the user.
|
del |
Delete a user.
|
login |
Process user login – Take note, enable session_start() in the core, or start the session somewhere before processing this.
|
logoff |
Process user logoff. |