Permalink
Browse files

MDL-33340 completion: Incorrect logic in hidden field check

Credit to Jody Steele
  • Loading branch information...
1 parent dd89f61 commit 986095771bf2d21f503af1cda4c89388682aee26 @ankitagarwal ankitagarwal committed with danpoltawski Jun 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 report/outline/index.php
View
@@ -42,7 +42,7 @@
$showlastaccess = true;
$hiddenfields = explode(',', $CFG->hiddenuserfields);
-if (array_search('lastaccess', $hiddenfields) and !has_capability('moodle/user:viewhiddendetails', $context)) {
+if (array_search('lastaccess', $hiddenfields) !== false and !has_capability('moodle/user:viewhiddendetails', $context)) {
$showlastaccess = false;
}

0 comments on commit 9860957

Please sign in to comment.