summaryrefslogtreecommitdiffstats
path: root/application/libraries/Duser/drivers/Duser_db.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/libraries/Duser/drivers/Duser_db.php')
-rw-r--r--application/libraries/Duser/drivers/Duser_db.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/application/libraries/Duser/drivers/Duser_db.php b/application/libraries/Duser/drivers/Duser_db.php
index 1258ec585..a58b5a298 100644
--- a/application/libraries/Duser/drivers/Duser_db.php
+++ b/application/libraries/Duser/drivers/Duser_db.php
@@ -9,11 +9,13 @@
class Duser_db extends Duser_Driver {
+ /* FIXME: If you use this driver as a template, remove can_reset_password
+ * and can_register_new_users. These features require the DB driver and
+ * will NOT work with other drivers.
+ */
public $optional_functions = array(
- 'username_exists',
'can_reset_password',
'can_register_new_users',
- 'get_email',
);
public function login($username, $password)
@@ -26,11 +28,7 @@ class Duser_db extends Duser_Driver {
WHERE `username` = ?
', array($username))->row_array();
- if (!isset($query["username"]) || $query["username"] !== $username) {
- return false;
- }
-
- if (!isset($query["password"])) {
+ if (empty($query)) {
return false;
}