code: public function confirm($hashedEmail, $hashedCode, & $user = null)
      {
          // Status code
          $status = false;
  
          // Find user record by hashed email
          if (dbQuery($this->dbTable)->cond($this->dbHashEmailField, $hashedEmail)->first($user)) {
  
              // If this email is confirmed
              if ($user[$this->dbConfirmField] == 1) {
                  $status = EmailStatus::SUCCESS_EMAIL_CONFIRMED_ALREADY;
              } elseif ($user[$this->dbConfirmField] === $hashedCode) {
                  // If user confirmation codes matches
  
                  // Set db data that this email is confirmed
                  $user[$this->dbConfirmField] = 1;
                  $user->save();
  
                  // Everything is OK
                  $status = EmailStatus::SUCCESS_EMAIL_CONFIRMED;
              }
          } else {
              $status = EmailStatus::ERROR_EMAIL_CONFIRM_NOTFOUND;
          }
  
          // Call external confirm handler if present
          if (is_callable($this->confirmHandler)) {
              // Call external handler - if it fails - return false
              if (!call_user_func_array($this->confirmHandler, array(&$user, $status))) {
                  $status = EmailStatus::ERROR_EMAIL_CONFIRM_HANDLER;
              }
          }
  
          return $status;
      }
docs: Generic email confirmation handler
  @param string $hashedEmail   Hashed user email
  @param string $hashedCode    Hashed user email confirmation code
  @param mixed $user           Variable to return created user object
  
  @return int EmailStatus value