]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/common.lib.php
Wrote ttPluginEnabled() function.
[timetracker.git] / WEB-INF / lib / common.lib.php
index 4111c3e159102af6d75e8c3e6c3468c9a85837b1..3644c0587471ac433005eb93b83010c60785490a 100644 (file)
@@ -341,11 +341,9 @@ function ttAccessCheck($required_rights)
   return true;
 }
 
-
-
-
-
-
-
-       
-?>
\ No newline at end of file
+// ttPluginEnabled is used to check whether a plugin is enabled for user.
+function ttPluginEnabled($plugin)
+{
+  global $user;
+  return in_array($plugin, explode(',', $user->plugins));
+}