Skip to content

Omnikron13/phpuserlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

--------------------------------------------------------------------------------
  ________/\__                  _______/\   _________.___  .__  __ ___________
  \______   \ |__ ______  __ /\/   _____/___\_____   \   | |__|/  |\_   _____/
   |         ||  \\____ \|  |  \_____  \/ __ \      _/   | |  \   __\    __)_ 
   |    |___/  Y  \  |/  )  |  /        \ ___/   |   \   |_/\ ||  | |        \
   |____|  |___|  /   __/|____/  _______/.____\__|_  /_______\||__|/_______  /
                \/|__|         \/                  \/             v[trunk] \/
--------------------------------------------------------------------------------

::: OVERVIEW :::
phpuserlite is a PHP module that provides a class (User) for managing the basic
functionality of a user system for websites including; login & registration
forms, email confirmation, username/password/email validation, password
processing etc. The design is focussed on a high level of security while
maintaining ease of use and configuration, and uses SQLite to handle the
underlying database.

You can find the latest release of phpuserlite at the project homepage:
https://github.com/Omnikron13/phpuserlite

Alternatively you can anonymously check out the latest revision with git from:
https://github.com/Omnikron13/phpuserlite.git

Note that code checked out from the trunk is not guaranteed stable, or indeed
guaranteed functional.

::: REQUIREMENTS :::
phpuserlite requires PHP 7.0 or higher.
phpuserlite also requires the PDO and SQLite PDO driver PHP extensions, though
PDO and PDO_SQLITE should be included with PHP. SQLite version 3.6.19 or later
is required to use the foreign key constraint in the usersChangeEmail table
schema.
PDO extension:     http://php.net/manual/book.pdo.php
SQLite PDO driver: http://pecl.php.net/package/PDO_SQLITE

::: INSTALLATION :::
To install phpuserlite, simply ensure that you have all the dependencies listed
above, then copy User.php to wherever in your PHP include path you wish to keep
library code. Optionally copy doc/phpuserlite.7 into section 7 of your manual,
which would typically be /usr/share/man/man7

::: EXAMPLE :::
A quick example of setting up phpuserlite for use, assuming a config file called
example.cfg is located in the same directory as User.php, and then adding a new
user to the database

<?php
require_once 'User.php';
User::loadConfig('example.cfg');
User::setupDB();
User::add('a_user', 'password', 'user@example.com');
?>

Documentation of these methods, and the rest of the functionality of phpuserlite
can be found in the included man page (doc/phpuserlite.7)

::: SUGGESTIONS :::
I personally recommend not restricting the maximum password length any more than
the default REGEX already does - long passwords are strong passwords.
Additionally I suggest advising users to use a phrase for their password rather
than advising/forcing them to use numbers/special characters/etc.
'i like eating bees' is a stronger password than 'dY_$@62Ls8'.

You may even wish to consider adding this code or similar to your registration
form: http://rumkin.com/tools/password/passchk.php

::: CREDITS :::
Code & documentation written by Joey Sabey (GameFreak7744@gmail.com)
phpuserlite complies to SemVer 2.0.0 as described at http://semver.org
ASCII art header for this readme generated by FIGlet using the 'graffiti'
typeface by Leigh Purdie and Tim Maggio, tweaked to fit 80 characters and to
improve aesthetics (to personal taste)
FIGlet and the graffiti typeface can be found at http://figlet.org
Project hosting for phpuserlite provided by GitHub - https://github.com
Default email regex by Jan Goyvaerts is from http://regular-expressions.info
Special thanks to William Sabey for providing testing, debug assistance and
stylistic advice for the documentation at all hours of the day & night.

About

Automatically exported from code.google.com/p/phpuserlite

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages