- // Check returned values against current access permissions
- //
- // Admin access ----- Guest access ----- --- Guest or member? ---
- if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
- // If you are admin you are welcome for everything!
- $ret = "done";
- } elseif ($locked == "Y") {
- // Module is locked
- $ret = "locked";
- } elseif (($mem == "Y") && (!IS_MEMBER())) {
- // You have to login first!
- $ret = "mem_only";
- } elseif (($admin == "Y") && (!IS_ADMIN())) {
- // Only the Admin is allowed to enter this module!
- $ret = "admin_only";
- }
+ // Is the module found?
+ if ($found === true) {
+ // Check returned values against current access permissions
+ //
+ // Admin access ----- Guest access ----- --- Guest or member? ---
+ if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
+ // If you are admin you are welcome for everything!
+ $ret = "done";
+ } elseif ($locked == "Y") {
+ // Module is locked
+ $ret = "locked";
+ } elseif (($mem == "Y") && (!IS_MEMBER())) {
+ // You have to login first!
+ $ret = "mem_only";
+ } elseif (($admin == "Y") && (!IS_ADMIN())) {
+ // Only the Admin is allowed to enter this module!
+ $ret = "admin_only";
+ } else {
+ // @TODO Nothing helped???
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
+ $ret,
+ $locked,
+ $admin,
+ $mem
+ ));
+ }
+ } // END - if