public function GetUserPermissions($UserID, $LimitToSuffix = '', $JunctionTable = FALSE, $JunctionColumn = FALSE, $ForeignKey = FALSE, $ForeignID = FALSE) {
      // Get all permissions
      $PermissionColumns = $this->PermissionColumns($JunctionTable, $JunctionColumn);

      // Select any that match $LimitToSuffix
      foreach($PermissionColumns as $ColumnName => $Value) {
         if (!empty($LimitToSuffix) && substr($ColumnName, -strlen($LimitToSuffix)) != $LimitToSuffix)
            continue; // permission not in $LimitToSuffix
         $this->SQL->Select('p.`'.$ColumnName.'`', 'MAX');
      }
      
      // Generic part of query
      $this->SQL->From('Permission p')
         ->Join('UserRole ur', 'p.RoleID = ur.RoleID')
         ->Where('ur.UserID', $UserID);
      
      // Either limit to 1 junction or exclude junctions
      if ($JunctionTable && $JunctionColumn) {
         $this->SQL
            ->Select(array('p.JunctionTable', 'p.JunctionColumn', 'p.JunctionID'))
            ->GroupBy(array('p.JunctionTable', 'p.JunctionColumn', 'p.JunctionID'));
         if ($ForeignKey && $ForeignID) {
            $this->SQL
               ->Join("$JunctionTable j", "j.$JunctionColumn = p.JunctionID")
               ->Where("j.$ForeignKey", $ForeignID);
         }
      } else {
         $this->SQL->Where('p.JunctionTable is null');
      }
      
      return $this->SQL->Get()->ResultArray();
   }