Gets the verification code.
@return string the verification code.
507262
public function getVerifyCode()
    {
        $session = Yii::$app->getSession();
        $session->open();
        $name = $this->getSessionKey();
        return $session[$name];
    }
21314
public function getVerifyCode($regenerate = false)
    {
        if ($this->fixedVerifyCode !== null) {
            return $this->fixedVerifyCode;
        }
        $verifyCode = $this->cache->get($this->sessionKey);
        if ($verifyCode === null || $regenerate) {
            $verifyCode = $this->generateVerifyCode();
            Yii::$app->cache->multiSet([
                $this->sessionKey => $verifyCode,
                $this->sessionKey . 'time' => time(),
            ], $this->waitTime);

            Yii::$app->cache->multiSet([
                $this->sessionKey . 'mobile' => $this->mobile,
                $this->sessionKey . 'count' => 1,
            ], $this->duration);
        }
        return $verifyCode;
    }
573171
public function verify()
    {
        if (!$this->validate()) {
            return null;
        }
        $this->_query = Thread::find()->where([
                            Thread::tableName() . '.id' => $this->threadId,
                            Thread::tableName() . '.slug' => $this->threadSlug,
                            Thread::tableName() . '.forum_id' => $this->forumId,
                            Thread::tableName() . '.category_id' => $this->categoryId,
                        ]);
        if (Podium::getInstance()->user->isGuest) {
            return $this->getThreadForGuests();
        }
        return $this->getThreadForMembers();
    }
645165
public function getExitCode()
    {
        if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.');
        }

        $this->updateStatus(false);

        return $this->exitcode;
    }
94648
public function getPreProcessedCode(): string
    {
        $code = $this->getCode();

        $filePath = $this->getFilePath();
        $code = str_replace(
            '__FILE__',
            "'" . $filePath . "'",
            $code
        );
        $code = str_replace(
            '__DIR__',
            "'" . dirname($filePath) . "'",
            $code
        );
        $code = preg_replace(
            '/([^\w:])(__CLASS__)\(/',
            '$1' . $this->getClassName() . '(',
            $code
        );
        $code = str_replace(
            '__CLASS__',
            "'" . $this->getClassName() . "'",
            $code
        );
        $code = preg_replace(
            '/^(assert)\(/',
            'test_flight_assert(',
            $code
        );
        $code = preg_replace(
            '/([^\w:])(assert)\(/',
            '$1test_flight_assert(',
            $code
        );

        return $code;
    }
788815
public function activationCode()
    {
        $routeParameter = $this->property('paramCode');

        if ($code = $this->param($routeParameter)) {
            return $code;
        }

        return get('activate');
    }
136013
public function code()
    {
        $code = $this->language()->code() . '_' . $this->territory()->code();

        if ($this->script() != $this->language()->defaultScript()) {
            $code .= '@' . strtolower($this->script()->unicodeName());
        }

        if ($this->variant() !== null) {
            if ($this->variant()->code() === 'posix') {
                $code = 'POSIX';
            } else {
                $code .= '@' . $this->variant()->code();
            }
        }

        return $code;
    }
171014
public function getIdentifier()
    {
        $identifierAttribute = $this->getFamily()->getAttributeAsIdentifier();
        if ($identifierAttribute) {
            /** @noinspection ExceptionsAnnotatingAndHandlingInspection */

            return $this->get($identifierAttribute->getCode());
        }

        return $this->getId();
    }
409492
public function getCode()
    {
        return join(' ', array(
            $this->getResponseCode(),
            $this->getResponseText(),
            '(' . $this->getHttpResponseCode(),
            $this->getHttpResponseCodeText() . ')',
        ));
    }
1033061
public function getCode() {
        $result = '';

        if ($this->options->getRenderContextDirective()) {
            $result .= $this->renderedCode->getContextDirective();
        }
        if ($this->options->getRenderDirectives()) {
            $result .= $this->renderedCode->getDirectives();
        }
        if ($this->options->getRenderGlobalCode()) {
            $result .= $this->renderedCode->getGlobalCode();
        }
        if ($this->options->getRenderMainFunction()) {
            $result .= $this->renderedCode->getMainFunction();
        }

        if ($this->options->getCompress()) {
            $result = $this->compress($result);
        }
        if ($this->options->getIncludeScriptTag()) {
            $result = $this->addScriptTag($result);
        }

        return $result;
    }
1031670
protected function generateVerifyCode()
    {
        if ($this->minLength > $this->maxLength) {
            $this->maxLength = $this->minLength;
        }
        if ($this->minLength < 3) {
            $this->minLength = 3;
        }
        if ($this->maxLength > 20) {
            $this->maxLength = 20;
        }
        $length = mt_rand($this->minLength, $this->maxLength);

        $letters = [0,1,2,3,4,5,6,7,8,9];
        return array_rand($letters).array_rand($letters).array_rand($letters).array_rand($letters);
		//$vowels = '01234';
        //$code = '';
       // for ($i = 0; $i < $length; ++$i) {
            //if ($i % 2 && mt_rand(0, 10) > 2 || !($i % 2) && mt_rand(0, 10) > 9) {
            //    $code .= $vowels[mt_rand(0, 4)];
            //} else {
               // $code .= $letters[mt_rand(0, 20)];
           // }
       // }

        //return $code;
    }
647141
public function getValidationMessage()
    {
        $json = $this->getJsonResponse();
        if ($json && $json->errors && $json->errors->message) {
            return $json->errors->message;
        } else {
            return 'Unknown validation error';
        }
    }
1270555
public function generateVerifyCode(): string
    {
        if ($this->minLength > $this->maxLength) {
            $this->maxLength = $this->minLength;
        }
        if ($this->minLength < 3) {
            $this->minLength = 3;
        }
        if ($this->maxLength > 20) {
            $this->maxLength = 20;
        }
        $length = random_int($this->minLength, $this->maxLength);

        $letters = 'bcdfghjklmnpqrstvwxyz';
        $vowels = 'aeiou';
        $code = '';
        for ($i = 0; $i < $length; ++$i) {
            if (($i % 2 && random_int(0, 10) > 2) || (!($i % 2) && random_int(0, 10) > 9)) {
                $code .= $vowels[random_int(0, 4)];
            } else {
                $code .= $letters[random_int(0, 20)];
            }
        }

        return $code;
    }
849655
public function requestVoiceVerify()
    {
        $minutes = self::getCodeValidMinutes();
        $code = $this->verifyCode();
        $for = $this->input(self::getMobileField());

        $templates = $this->generateTemplates(self::VOICE_VERIFY);
        $tplData = $this->generateTemplateData($code, $minutes, self::VOICE_VERIFY);

        $result = PhpSms::voice($code)->template($templates)->data($tplData)->to($for)->send();
        if ($result === null || $result === true || (isset($result['success']) && $result['success'])) {
            $this->state['sent'] = true;
            $this->state['to'] = $for;
            $this->state['code'] = $code;
            $this->state['deadline'] = time() + ($minutes * 60);
            $this->storeState();
            $this->setCanResendAfter(self::getInterval());

            return self::generateResult(true, 'voice_sent_success');
        }

        return self::generateResult(false, 'voice_sent_failure');
    }
1250728
public function getIdentifier()
    {
        if (is_array($this->callback)) {
            $class = $this->callback[0];

            if (is_object($class)) {
                $class = get_class($class);
            }

            return $class . '::' . $this->callback[1];
        }
        else if (is_object($this->callback)) {
            return spl_object_hash((object) $this->callback);
        }

        return (string) $this->callback;
    }
235926
public function getID()
    {
        // RUN/RUT se encuentra en la extensión del certificado, esto de acuerdo
        // a Ley 19.799 sobre documentos electrónicos y firma electrónica
        $x509 = new \phpseclib\File\X509();
        $cert = $x509->loadX509($this->certs['cert']);
        if (isset($cert['tbsCertificate']['extensions'])) {
            foreach ($cert['tbsCertificate']['extensions'] as $e) {
                if ($e['extnId']=='id-ce-subjectAltName') {
                    return ltrim($e['extnValue'][0]['otherName']['value']['ia5String'], '0');
                }
            }
        }
        // se obtiene desde serialNumber (esto es sólo para que funcione la firma para tests)
        if (isset($this->data['subject']['serialNumber'])) {
            return ltrim($this->data['subject']['serialNumber'], '0');
        }
        // no se encontró el RUN
        return $this->error('No fue posible obtener el ID de la firma');
    }
743489
public function getCode()
    {
        $html = $this->form;

        if ($this->meta->checks['honeypots'])
        {
            $html = $this->createHoneypots($html, $this->honeypots);
        }

        $botoborData =
            '<div style="display: none;">' .
            $this->createInput('hidden', Botobor::META_FIELD_NAME, $this->meta->getEncoded()) .
            '</div>';

        $html = preg_replace('/(<form[^>]*>)/si', '$1'.$botoborData, $html);

        return $html;
    }