protected function GetInvitationCode() {
      // Generate a new invitation code.
      $Code = RandomString(8);
      
      // Make sure the string doesn't already exist in the invitation table
      $CodeData = $this->GetWhere(array('Code' => $Code));
      if ($CodeData->NumRows() > 0) {
         return $this->GetInvitationCode();
      } else {
         return $Code;         
      }
   }