Permalink
Browse files

MDL-33340 completion: Incorrect logic in hidden field check

Credit to Jody Steele
  • Loading branch information...
1 parent 102903f commit 321554d35f295b8ea0fdd8cedb62a748f0390827 @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 321554d

Please sign in to comment.