diff options
Diffstat (limited to 'config/bootstrap')
-rw-r--r-- | config/bootstrap/auth.php | 24 | ||||
-rw-r--r-- | config/bootstrap/connections.php | 26 | ||||
-rw-r--r-- | config/bootstrap/libraries.php | 5 |
3 files changed, 24 insertions, 31 deletions
diff --git a/config/bootstrap/auth.php b/config/bootstrap/auth.php index 87ee787..67c3143 100644 --- a/config/bootstrap/auth.php +++ b/config/bootstrap/auth.php @@ -24,25 +24,11 @@ Auth::config(array( //'scope' => array('active' => 'true'), //The active field must be true otherwise they can't auth, though we need //to eventually send them to a page that explains they are banned. 'session' => array('options' => array('name' => 'default')), - 'filters' => array( - 'password' => function($password) - { - return $password; //prevents li3 from hashing the password before hand. - }, - function($data) { - if(isset($data['username'])) - { - //Get the user from the database - $user = User::find('first', array('conditions' => array('username' => $data['username']))); - //Hash the submitted password with the stored salt. - $data['password'] = Password::hash($data['password'], $user->salt); - } - return $data; - } - ) - ) - ) -); + 'validators' => array( + 'password' => function($form, $data) { + return password::check($form, $data); + })) +)); $secret = "cake"; diff --git a/config/bootstrap/connections.php b/config/bootstrap/connections.php index a9355e6..645e587 100644 --- a/config/bootstrap/connections.php +++ b/config/bootstrap/connections.php @@ -38,9 +38,21 @@ use lithium\data\Connections; /** + * Uncomment this configuration to use MySQL as your default database. + */ +Connections::add('default', array( + 'type' => 'database', + 'adapter' => 'MySql', + 'host' => '127.0.0.1', + 'login' => 'otakuhub', + 'password' => 'otakuhub', + 'database' => 'otakuhub' + )); + +/** * Uncomment this configuration to use MongoDB as your default database. */ - Connections::add('default', array( + Connections::add('mongo', array( 'type' => 'MongoDb', 'host' => 'localhost', 'database' => 'otakuhub', @@ -57,16 +69,6 @@ use lithium\data\Connections; // 'database' => 'my_app' // )); -/** - * Uncomment this configuration to use MySQL as your default database. - */ -// Connections::add('default', array( -// 'type' => 'database', -// 'adapter' => 'MySql', -// 'host' => 'localhost', -// 'login' => 'root', -// 'password' => '', -// 'database' => 'my_app' -// )); + ?>
\ No newline at end of file diff --git a/config/bootstrap/libraries.php b/config/bootstrap/libraries.php index e013ddc..e4d5ff4 100644 --- a/config/bootstrap/libraries.php +++ b/config/bootstrap/libraries.php @@ -124,4 +124,9 @@ Libraries::add('app', array('default' => true)); // Libraries::add('li3_docs'); Libraries::add('li3_flash_message'); Libraries::add('li3_paginate'); + +//Swiftmail integration +Libraries::add('li3_swiftmailer'); + + ?> |