plugins/SpecialUserFuncs.php
changeset 402 d907601ccad2
parent 401 6ae6e387a0e3
child 404 fb4f9e6f378f
equal deleted inserted replaced
401:6ae6e387a0e3 402:d907601ccad2
  1321   $hash = $paths->getParam(0);
  1321   $hash = $paths->getParam(0);
  1322   if ( !$hash || !preg_match('#^([0-9a-f]*){32,40}$#i', $hash) )
  1322   if ( !$hash || !preg_match('#^([0-9a-f]*){32,40}$#i', $hash) )
  1323   {
  1323   {
  1324     $paths->main_page();
  1324     $paths->main_page();
  1325   }
  1325   }
  1326   
  1326 
       
  1327   $session->make_captcha(7, $hash);  
  1327   $code = $session->generate_captcha_code();
  1328   $code = $session->generate_captcha_code();
  1328   $q = $db->sql_query('UPDATE ' . table_prefix . "captcha SET code = '$code' WHERE session_id = '$hash';");
  1329   $q = $db->sql_query('UPDATE ' . table_prefix . "captcha SET code = '$code' WHERE session_id = '$hash';");
  1329   if ( !$q )
  1330   if ( !$q )
  1330     $db->_die();
  1331     $db->_die();
  1331   
  1332