private function validateTwoFactorCode()
    {
        $otpSeed = $this->getUser()->getMetadataObject('OTPSeed', false)->value;

		if ($otpSeed === false)
			return false;
		
        $otplib = new TOTP(Cii::decrypt($otpSeed));

        return $otplib->validate($this->twoFactorCode);
    }