summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-01-30 22:39:21 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-01-30 22:39:21 +0100
commit7dceccd8832791357a7049f38a9f6b83fe431ed2 (patch)
treede24768936c058419e28a5a09fae9a3ec9236cda /application
parentf8ac2f6582001bfa3b42ac4fbdc77ff97137a8f8 (diff)
Make authentication driver configureable
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/config/config.php3
-rw-r--r--application/libraries/Duser/Duser.php5
2 files changed, 6 insertions, 2 deletions
diff --git a/application/config/config.php b/application/config/config.php
index cdcf2ff5e..8df4dca9d 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -382,6 +382,9 @@ $config['small_upload_size'] = 1024*10; // 10KB
$config['contact_me_url'] = ''; // ommiting this will remove the "contact me" line.
+// for possible drivers look into ./application/libraries/Duser/drivers/
+$config['authentication_driver'] = 'db';
+
if (file_exists(FCPATH.'application/config/config-local.php')) {
include FCPATH.'application/config/config-local.php';
}
diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php
index c06f4f723..f7b2493d8 100644
--- a/application/libraries/Duser/Duser.php
+++ b/application/libraries/Duser/Duser.php
@@ -43,8 +43,9 @@ class Duser extends CI_Driver_Library {
function __construct()
{
- // TODO: read config
- $this->_adapter = 'db';
+ $CI =& get_instance();
+
+ $this->_adapter = $CI->config->item("authentication_driver");
}
// require an optional function to be implemented