/**
* Checks if the answer is correct.
*
* @param string $code The answer.
*
* @return bool Whether the provided answer was correct
*
* @since 2.5
* @throws \RuntimeException
*/
public function checkAnswer($code)
{
// Check if captcha is already loaded
if ($this->captcha === null) {
return false;
}
$arg = ['code' => $code];
$result = $this->update('onCheckAnswer', $arg);
return $result;
}