panique/php-login — pull request #98 by nyamsprod (2013-07-01 09:51:54+00:00)
Title: Minimal Deep Rewrite

I have rewrote the Minimal to better filter and validated input data and to simplify the code. In doing so I have:
* Created an `Auth` class that is extended by the `Registration` and the `Login` class
* The `Auth` class initiate the database connection and handles the possible errors;
* Errors are represented by constant in the `Auth` class to better handle script localization and are always attach to a context.
* I've used the php `filter_` functions to better validate user input data
* I've added a `user_token` property in the session to also validate a user already connected this can help to prevent session corruption and add a session timeout functionnality.
* In the `db.php` file I have added the constant `DB_CHARSET` which is needed to better sanitize data before injecting them into the database.
* I've added Docblocks to almost every method and/or property

Of course, the views and the mains script have been updated accordingly by adding a require to the `Auth.php` class