applications/dashboard/controllers/class.entrycontroller.php
public function EmailConfirm($UserID, $EmailKey = '') {
      $User = $this->UserModel->GetID($UserID);
      
      if (!$User)
         throw NotFoundException('User');

      $EmailConfirmed = $this->UserModel->ConfirmEmail($User, $EmailKey);
      $this->Form->SetValidationResults($this->UserModel->ValidationResults());

      if ($EmailConfirmed) {
         $UserID = GetValue('UserID', $User);
         Gdn::Session()->Start($UserID);
      }

      $this->SetData('EmailConfirmed', $EmailConfirmed);
      $this->SetData('Email', $User->Email);
      $this->Render();
   }
public function EmailConfirm($UserID, $EmailKey = '') {
      $User = $this->UserModel->GetID($UserID);
      
      if (!$User)
         throw NotFoundException('User');

      $EmailConfirmed = $this->UserModel->ConfirmEmail($User, $EmailKey);
      $this->Form->SetValidationResults($this->UserModel->ValidationResults());

      if ($EmailConfirmed) {
         $UserID = GetValue('UserID', $User);
         Gdn::Session()->Start($UserID);
      }

      $this->SetData('EmailConfirmed', $EmailConfirmed);
      $this->SetData('Email', $User->Email);
      $this->Render();
   }
public function EmailConfirm ( $ UserID , $ EmailKey = '' ) { $ User = $ this -> UserModel -> GetID ( $ UserID ) ; if ( ! $ User ) throw NotFoundException ( 'User' ) ; $ EmailConfirmed = $ this -> UserModel -> ConfirmEmail ( $ User , $ EmailKey ) ; $ this -> Form -> SetValidationResults ( $ this -> UserModel -> ValidationResults ( ) ) ; if ( $ EmailConfirmed ) { $ UserID = GetValue ( 'UserID' , $ User ) ; Gdn :: Session ( ) -> Start ( $ UserID ) ; } $ this -> SetData ( 'EmailConfirmed' , $ EmailConfirmed ) ; $ this -> SetData ( 'Email' , $ User -> Email ) ; $ this -> Render ( ) ; }
Confirm email address is valid via sent code.

@access public
@since 2.0.0

@param int $UserID
@param string $EmailKey Authenticate with unique, 1-time code sent via email.
Confirm email address is valid via sent code .