summaryrefslogtreecommitdiffstats
path: root/application/libraries/Duser/Duser.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-25 15:03:59 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-25 15:03:59 +0200
commit6705e6c987b6e4a43bbb666c33d8fc8a0ef1a0a6 (patch)
treeb815871f7f031633c400a33cf5d6245282d59955 /application/libraries/Duser/Duser.php
parent50230001eb5387b6b0ff7ce906d074ef4a530d11 (diff)
parentab98249a9a087745b29e5cb258ea0b624f12f64b (diff)
Merge branch 'working'
Diffstat (limited to 'application/libraries/Duser/Duser.php')
-rw-r--r--application/libraries/Duser/Duser.php33
1 files changed, 20 insertions, 13 deletions
diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php
index 96d61e3cc..07a16190c 100644
--- a/application/libraries/Duser/Duser.php
+++ b/application/libraries/Duser/Duser.php
@@ -9,14 +9,11 @@
abstract class Duser_Driver extends CI_Driver {
- // List of optional functions or function groups that are implemented
+ // List of optional functions that are implemented
//
- // Possible values are names of functions already implemented in this
- // abstract class or the function groups listed below.
- //
- // Possible function groups are:
- // - can_register_new_users
- // - can_reset_password
+ // Possible values are:
+ // - can_register_new_users (only supported with the DB driver!)
+ // - can_reset_password (only supported with the DB driver!)
public $optional_functions = array();
/*
@@ -24,12 +21,26 @@ abstract class Duser_Driver extends CI_Driver {
* - username string
* - userid INT > 0
*
+ * @param username
+ * @param password
* @return mixed array on success, false on failure
*/
abstract public function login($username, $password);
+ /*
+ * @param username
+ * @return boolean true is username exists, false otherwise
+ */
public function username_exists($username) {
- return false;
+ return null;
+ }
+
+ /*
+ * @param userid
+ * @return string email address of the user
+ */
+ public function get_email($userid) {
+ return null;
}
}
@@ -38,7 +49,7 @@ class Duser extends CI_Driver_Library {
protected $_adapter = null;
protected $valid_drivers = array(
- 'duser_db', 'duser_ldap'
+ 'duser_db', 'duser_ldap', 'duser_fluxbb'
);
function __construct()
@@ -87,8 +98,6 @@ class Duser extends CI_Driver_Library {
public function username_exists($username)
{
- $this->require_implemented(__FUNCTION__);
-
if ($username === false) {
return false;
}
@@ -98,8 +107,6 @@ class Duser extends CI_Driver_Library {
public function get_email($userid)
{
- $this->require_implemented(__FUNCTION__);
-
return $this->{$this->_adapter}->get_email($userid);
}
}