# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/plugin.foundation.php +++ administrator/components/com_comprofiler/plugin.foundation.php @@ -41,7 +41,7 @@ if ( ! isset( $cacheItemids[$task] ) ) { if ( class_exists( 'moscomprofilerUser', false ) ) { - $viewLevels = CBuser::getMyInstance()->getAuthorisedViewLevelsIds(); + $viewLevels = CBuser::getMyInstance()->getAuthorisedViewLevelsIds( ( checkJversion() >= 2 ? false : true ) ); } else { // Compute View Level using CMS without loading cb.table and cb.database if they are not already loaded (e.g. when using this function in modules): switch ( checkJversion() ) { @@ -49,7 +49,8 @@ $viewLevels = JUser::getInstance()->getAuthorisedViewLevels(); break; case 1: - $viewLevels = array( JUser::getInstance()->get( 'aid' ) ); + $viewLevel = JFactory::getUser()->get( 'aid' ); + $viewLevels = ( $viewLevel == 2 ? array( 0, 1, 2 ) : ( $viewLevel == 1 ? array( 0, 1 ) : array( 0 ) ) ); break; case 0: case -1: