<commit_before># User class
This class can register and login users in a database with PDO. It can:

- Register users sending confirmation email
- The user accounts have a unique email, password, first and last name are stored in database table using PDO. It was tested to work with at least MySQL, PostgreSQL and SQLite.
- The user password is hashed before storing using password_hash function
- Activate account with verification code sent by email
- Perform secure login authentication using sessions and password_hash again to check the password
- It can block users after a configurable limit number of login attempts
- Logout users ending sessions

A Secure PHP7 class for basic user login and registration.

Very easy to use as REST API, with AJAX and Bootstrap

PHP Tested: 5.6.19, 7.0.11

This [PHP Secure Login class]https://www.phpclasses.org/package/10087-PHP-Register-and-login-users-in-a-database-with-PDO.html is available in the [PHP Classes site]https://www.phpclasses.org


## CONTENTS

	1. VARIABLE DEFINITIONS
	2. ALL METHODS
		2.1. User::dbConnect()
		2.2. User::getUser()
		2.3. User::login()
		2.4. User::registration()
		2.5. User::sendConfirmationEmail()
		2.6. User::emailActivation()
		2.7. User::passwordChange()
		2.8. User::assignRole()
		2.9. User::userUpdate()
		2.10. User::checkEmail()
		2.11. User::registerWrongLoginAttemp()
		2.12. User::hashPass()
		2.13. User::printMsg()
		2.14. User::logout()
		2.15. User::listUsers()<commit_msg>fixed the links in the Read me file<commit_after># User class
This class can register and login users in a database with PDO. It can:

- Register users sending confirmation email
- The user accounts have a unique email, password, first and last name are stored in database table using PDO. It was tested to work with at least MySQL, PostgreSQL and SQLite.
- The user password is hashed before storing using password_hash function
- Activate account with verification code sent by email
- Perform secure login authentication using sessions and password_hash again to check the password
- It can block users after a configurable limit number of login attempts
- Logout users ending sessions

A Secure PHP7 class for basic user login and registration.

Very easy to use as REST API, with AJAX and Bootstrap


PHP Tested: 5.6.19, 7.0.11

This [PHP Secure Login class](https://www.phpclasses.org/package/10087-PHP-Register-and-login-users-in-a-database-with-PDO.html) is available in the [PHP Classes site](https://www.phpclasses.org)


## CONTENTS

	1. VARIABLE DEFINITIONS
	2. ALL METHODS
		2.1. User::dbConnect()
		2.2. User::getUser()
		2.3. User::login()
		2.4. User::registration()
		2.5. User::sendConfirmationEmail()
		2.6. User::emailActivation()
		2.7. User::passwordChange()
		2.8. User::assignRole()
		2.9. User::userUpdate()
		2.10. User::checkEmail()
		2.11. User::registerWrongLoginAttemp()
		2.12. User::hashPass()
		2.13. User::printMsg()
		2.14. User::logout()
		2.15. User::listUsers()
{'fraction_non_alphanumeric': 0.10030292830696735, 'fraction_numerical': 0.035005048805116123, 'mean_word_length': 4.063032367972743, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2383641', 'n_tokens_mistral': 989, 'n_tokens_neox': 899, 'n_words': 354}