summaryrefslogtreecommitdiffstats
path: root/application/libraries/Duser
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-15 23:17:46 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-15 23:17:46 +0200
commit32cd82fc017195480a0d73acc19c7c64962153da (patch)
tree5649fde4e8e1a963a31fe95a0c25d554b24db1b9 /application/libraries/Duser
parent50230001eb5387b6b0ff7ce906d074ef4a530d11 (diff)
Add default get_email to Duser_Driver
This fixes a possible endless loop when the function is not implemented in the driver, but the array says it is. It also allows us to simply call it without checking if it's implemented. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/Duser')
-rw-r--r--application/libraries/Duser/Duser.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/application/libraries/Duser/Duser.php b/application/libraries/Duser/Duser.php
index 96d61e3cc..ecb0cd9c7 100644
--- a/application/libraries/Duser/Duser.php
+++ b/application/libraries/Duser/Duser.php
@@ -31,6 +31,10 @@ abstract class Duser_Driver extends CI_Driver {
public function username_exists($username) {
return false;
}
+
+ public function get_email($userid) {
+ return null;
+ }
}
class Duser extends CI_Driver_Library {
@@ -98,8 +102,6 @@ class Duser extends CI_Driver_Library {
public function get_email($userid)
{
- $this->require_implemented(__FUNCTION__);
-
return $this->{$this->_adapter}->get_email($userid);
}
}