From 2172c2049fc8b8eca5dbed7b659a089e20d1fadd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 16 Sep 2013 16:43:13 +0200 Subject: Duser: Add some comments Signed-off-by: Florian Pritz --- application/libraries/Duser/Duser.php | 10 ++++++++++ application/libraries/Duser/drivers/Duser_db.php | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'application/libraries') diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php index 42d6b1d62..b615528f7 100644 --- a/application/libraries/Duser/Duser.php +++ b/application/libraries/Duser/Duser.php @@ -24,14 +24,24 @@ 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 null; } + /* + * @param userid + * @return string email address of the user + */ public function get_email($userid) { return null; } diff --git a/application/libraries/Duser/drivers/Duser_db.php b/application/libraries/Duser/drivers/Duser_db.php index 1258ec585..5252ec48e 100644 --- a/application/libraries/Duser/drivers/Duser_db.php +++ b/application/libraries/Duser/drivers/Duser_db.php @@ -9,6 +9,10 @@ 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', -- cgit v1.2.3-24-g4f1b