Topics

Introduction

Simple User Access Control System is designed as a wrapper in which to encase other programs such as a message board or file access system. It is written in PHP, and designed to be highly and easily customize. It handles the user login and management, and passes all other requests as determined by the GET data to a function defined by the person extending it, thereby handling the security and allowing the developer to work on the other, perhaps more interesting sections of code.

Requirements

This piece of software requires the following:
  1. PHP
  2. MySQL
Please note that other DBs may work, but have not been tested.

Extension

To extend (ie. utilize) the wrapper, edit the file ./include/process.php as you see fit. The only GET key used by the wrapper is action. Use of the non-reserved (ie. not already in use) values for that variable is possible, however it is reccomended that a different variable be used. A list of the reserved variables/values can be found below. When not calling for a reserved action, a logged in user results in a call to the function process( ) in ./include/process.php from which all other functionality should be extended. A basic set of data is sent to the function as parameters, but other information can be easily gathered from the PHP arrays $_POST and $_GET. A session has already been initialized, and variables other than user may be written to it for storage.

As far as extending the DB, I would suggest that you reference the existing user table with one of your own, which will allow the easy addition of more information. Editing the current table might result in messy effects.

Reserved Variables/Values:

Installation

To install, follow these steps:
  1. Create a database, and make note of the login credentials.
  2. Edit the configuration file located at ./include/config.php to reflect the DB login credentials. Also update the variable prefix to reflect the desired table prefix and the salt variable to change the password salt used. DO NOT EDIT THESE VARIABLES FROM HERE ON OUT
  3. Edit the variables title, preloginand prelogout to reflect the desired information. These variables MAY be edited at any time.
  4. Save and close the configuration file.
  5. Direct your broswer to ./install.php and the database will be initialized if possible.
  6. You will be redirected to the index. Login using username: admin and password: password
  7. Enjoy.

Credits

Simple User Access Control System was originally written by Matt Berntsen in October of 2005.