applications/dashboard/models/class.invitationmodel.php
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;         
      }
   }
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;         
      }
   }
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 ; } }
Returns a unique 8 character invitation code
Returns a unique 8 character invitation code