Installation
Main Setup
With composer
-
Add this project in your composer.json:
"require": {
"lm-commons/lmc-user": "^3.1"
} -
Now tell composer to download LmcUser by running the command:
$ php composer.phar update
Post installation
-
Enabling it in your
application.config.php
file.<?php
return array(
'modules' => array(
// ...
'LmcUser',
),
// ...
);
Post-Install: Laminas\Db
- If you do not already have a valid Laminas\Db\Adapter\Adapter in your service
manager configuration, put the following in
./config/autoload/database.local.php
:
<?php
return array(
'db' => array(
'driver' => 'PdoMysql',
'hostname' => 'changeme',
'database' => 'changeme',
'username' => 'changeme',
'password' => 'changeme',
),
'service_manager' => array(
'factories' => array(
'Laminas\Db\Adapter\Adapter' => 'Laminas\Db\Adapter\AdapterServiceFactory',
),
),
);
Navigate to http://yourproject/user and you should land on a login page.
Password Security
DO NOT CHANGE THE PASSWORD HASH SETTINGS FROM THEIR DEFAULTS unless A) you have done sufficient research and fully understand exactly what you are changing, AND B) you have a very specific reason to deviate from the default settings.
If you are planning on changing the default password hash settings, please read the following:
The password hash settings may be changed at any time without invalidating existing user accounts. Existing user passwords will be re-hashed automatically on their next successful login.
WARNING: Changing the default password hash settings can cause serious problems such as making your hashed passwords more vulnerable to brute force attacks or making hashing so expensive that login and registration is unacceptably slow for users and produces a large burden on your server(s). The default settings provided are a very reasonable balance between the two, suitable for computing power in 2013.
Migration from ZfcUser
If using Zend DB update table name to lmc_user
Replace all namespace references to ZfcUser to LmcUser
Update references to the lowercase key zfcuser to lmcuser