Adds accessCheck according to patch #4 but using accessCheck(TRUE) instead of accessCheck(FALSE) if result should be limited to current users access (thanks to @Harpreet_singh_web).
Closes #3422402
changed title from Update accessCheck to Issue 3422402: Update accessCheck
changed title from Issue 3422402: Update accessCheck to Issue #3422402: Update accessCheck