You are here

function _captcha_update_captcha_session in CAPTCHA 7

Same name and namespace in other branches
  1. 8 captcha.inc \_captcha_update_captcha_session()
  2. 6.2 captcha.inc \_captcha_update_captcha_session()

Helper function for updating the solution in the CAPTCHA session table.

Parameters

int $captcha_sid: the CAPTCHA session ID to update.

string $solution: the new solution to associate with the given CAPTCHA session.

1 call to _captcha_update_captcha_session()
captcha_pre_render_process in ./captcha.module
Pre-render callback for additional processing of a CAPTCHA form element.

File

./captcha.inc, line 188
General CAPTCHA functionality and helper functions.

Code

function _captcha_update_captcha_session($captcha_sid, $solution) {
  db_update('captcha_sessions')
    ->condition('csid', $captcha_sid)
    ->fields(array(
    'timestamp' => REQUEST_TIME,
    'solution' => $solution,
  ))
    ->execute();
}