From d575e1bcb35dc228f3851fbf1f9d4a1de0bdecc4 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 10 May 2013 23:26:13 +0200 Subject: Hide function not supported by auth driver Signed-off-by: Florian Pritz --- application/helpers/filebin_helper.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'application/helpers') diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index 0951527fe..0063b6526 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -284,4 +284,19 @@ function getNormalizedFILES() return $ret; } +// Allow simple checking inside views +function auth_driver_function_implemented($function) +{ + static $result = array(); + if (isset($result[$function])) { + return $result[$function]; + } + + $CI =& get_instance(); + $CI->load->driver("duser"); + $result[$function] = $CI->duser->is_implemented($function);; + + return $result[$function]; +} + # vim: set noet: -- cgit v1.2.3-24-g4f1b