Author |
Message |
Vincent
Joined: 02 Apr 2007 Posts: 2
|
Posted: Mon Apr 02, 2007 6:50 pm Post subject: |
|
|
Hello
sorry for my poor english
i have a problem to insert the code Code: | tc_hook_register(); | in includes/usercp_register.php
my code of usercp_register.php is
Code: | $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
}
if ($googlemap_config['require_coords'] && empty($lng_map) && empty($lat_map))
{
$error = true;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['GMAP_coords_required'];
}
if ( !empty($website) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . "Spammers are *not* allowed!<br />Afin d'éviter l'inscription de spammers, veuillez ne pas
remplir le champ SITE WEB lors de votre inscription. Vous pourrez le remplir plus tard dans votre profil.";
}
}
if ($board_config['enable_confirm'] && $mode == 'register')
{
if (empty($HTTP_POST_VARS['confirm_id']))
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
{
$confirm_id = '';
}
$sql = 'SELECT code
FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain confirmation code', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
if ($row['code'] != $confirm_code)
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
else
{
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '$confirm_id'
AND session_id = '" . $userdata['session_id'] . "'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not delete confirmation code', '', __LINE__, __FILE__, $sql);
}
}
}
else
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
}
$db->sql_freeresult($result);
}
} |
I tested several solutions, but none works
thank you for your help
Vincent from France |
|
|
admin Site Admin
Joined: 18 Apr 2006 Posts: 805 Location: Saint-Petersburg, Russia
|
Posted: Tue Apr 03, 2007 2:13 am Post subject: |
|
|
Add
Code: | tc_hook_register(); |
before
Code: | if ($board_config['enable_confirm'] && $mode == 'register') |
_________________ Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development! |
|
|
Vincent
Joined: 02 Apr 2007 Posts: 2
|
Posted: Tue Apr 03, 2007 5:57 am Post subject: |
|
|
thank you, it's good |
|
|
admin Site Admin
Joined: 18 Apr 2006 Posts: 805 Location: Saint-Petersburg, Russia
|
Posted: Wed Apr 04, 2007 1:49 am Post subject: |
|
|
Good! _________________ Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development! |
|
|
Ok.