+ if (($action == 'login') || ($action == 'logout')) {
+ // If action is login or logout allow allways!
+ return true;
+ } elseif (isset($GLOBALS[__FUNCTION__][$adminId][$action][$what])) {
+ // If we have cache, use it
+ return $GLOBALS[__FUNCTION__][$adminId][$action][$what];
+ }
+
+ // But default result is failed
+ $GLOBALS[__FUNCTION__][$action][$what] = false;
+