public function UserModel_GetCategoryViewPermission_Create($Sender) {
      static $PermissionModel = NULL;


      $UserID = ArrayValue(0, $Sender->EventArguments, '');
		$CategoryID = ArrayValue(1, $Sender->EventArguments, '');
      $Permission = GetValue(2, $Sender->EventArguments, 'Vanilla.Discussions.View');
		if ($UserID && $CategoryID) {
         if ($PermissionModel === NULL)
            $PermissionModel = new PermissionModel();
         
         $Category = CategoryModel::Categories($CategoryID);
         if ($Category)
            $PermissionCategoryID = $Category['PermissionCategoryID'];
         else
            $PermissionCategoryID = -1;
         
         $Result = $PermissionModel->GetUserPermissions($UserID, $Permission, 'Category', 'PermissionCategoryID', 'CategoryID', $PermissionCategoryID);
         return (GetValue($Permission, GetValue(0, $Result), FALSE)) ? TRUE : FALSE;
      }
      return FALSE;
   }