applications/dashboard/controllers/class.profilecontroller.php
public function UnInvite($InvitationID = '', $TransientKey = '') {
      $this->Permission('Garden.SignIn.Allow');
      $InvitationModel = new InvitationModel();
      $Session = Gdn::Session();
      if ($Session->ValidateTransientKey($TransientKey)) {
         try {
            $InvitationModel->Delete($InvitationID, $this->UserModel);
         } catch (Exception $ex) {
            $this->Form->AddError(strip_tags($ex->getMessage()));
         }
            
         if ($this->Form->ErrorCount() == 0)
            $this->InformMessage(T('The invitation was removed successfully.'));

      }
      
      $this->View = 'Invitations';
      $this->Invitations();
   }
public function UnInvite($InvitationID = '', $TransientKey = '') {
      $this->Permission('Garden.SignIn.Allow');
      $InvitationModel = new InvitationModel();
      $Session = Gdn::Session();
      if ($Session->ValidateTransientKey($TransientKey)) {
         try {
            $InvitationModel->Delete($InvitationID, $this->UserModel);
         } catch (Exception $ex) {
            $this->Form->AddError(strip_tags($ex->getMessage()));
         }
            
         if ($this->Form->ErrorCount() == 0)
            $this->InformMessage(T('The invitation was removed successfully.'));

      }
      
      $this->View = 'Invitations';
      $this->Invitations();
   }
public function UnInvite ( $ InvitationID = '' , $ TransientKey = '' ) { $ this -> Permission ( 'Garden.SignIn.Allow' ) ; $ InvitationModel = new InvitationModel ( ) ; $ Session = Gdn :: Session ( ) ; if ( $ Session -> ValidateTransientKey ( $ TransientKey ) ) { try { $ InvitationModel -> Delete ( $ InvitationID , $ this -> UserModel ) ; } catch ( Exception $ ex ) { $ this -> Form -> AddError ( strip_tags ( $ ex -> getMessage ( ) ) ) ; } if ( $ this -> Form -> ErrorCount ( ) == 0 ) $ this -> InformMessage ( T ( 'The invitation was removed successfully.' ) ) ; } $ this -> View = 'Invitations' ; $ this -> Invitations ( ) ; }
Revoke an invitation.

@since 2.0.0
@access public
@param int $InvitationID Unique identifier.
@param string $TransientKey Security token.
Revoke an invitation .