To get started, you'll need to
- Change security strings in core.php > Security.salt & Security.cipherSeed
- Add a user database
- Add database config > database.php
- Add first user, allow access to add user
Configure::write('Security.salt', 'abc123');
Configure::write('Security.cipherSeed', '123');
CREATE TABLE users (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50),
password VARCHAR(50),
role VARCHAR(20),
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => '[mysql_username]',
'password' => '[mysql_password]',
'database' => '[database_name]',
'prefix' => '',
'encoding' => 'utf8',
);
app/Controller/AppController.php > beforeFilter > $this->Auth->allow('login', 'add');