Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
- <modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
- <name>One Account One Ip</name>
- <id>ips_doug:OneAccountOneIp</id>
- <version>1.0</version>
- <file name="$sourcedir/Register.php">
- <operation>
- <search position="replace"><![CDATA[// Begin the registration process.
- function Register($reg_errors = array())
- {
- global $txt, $boarddir, $context, $settings, $modSettings, $user_info;
- global $language, $scripturl, $smcFunc, $sourcedir, $smcFunc, $cur_profile;]]></search>
- <add><![CDATA[// Begin the registration process.
- function Register($reg_errors = array())
- {
- global $txt, $boarddir, $context, $settings, $modSettings, $user_info;
- global $language, $scripturl, $smcFunc, $sourcedir, $smcFunc, $cur_profile;
- //Prevent users from registering more than account from the same ip
- $request = $smcFunc['db_query']('', '
- SELECT COUNT(*)
- FROM {db_prefix}members
- WHERE member_ip = {string:member_ip}
- AND member_ip2 = {string:member_ip2}',
- array(
- 'member_ip' => $_SERVER['REMOTE_ADDR'],
- 'member_ip2' => $_SERVER['REMOTE_ADDR'],
- )
- );
- list ($exists) = $smcFunc['db_fetch_row']($request);
- $smcFunc['db_free_result']($request);
- if (!empty($exists))
- fatal_lang_error('ip_already_registered_once', false, array($_SERVER['REMOTE_ADDR']));]]></add>
- </operation>
- </file>
- <file name="$languagedir/Modifications.english.php">
- <operation>
- <search position="end" />
- <add><![CDATA[$txt['ip_already_registered_once'] = 'According to our database records there is already an account registered from this ip: %s.';]]></add>
- </operation>
- </file>
- <file name="$languagedir/Modifications.english-utf8.php" error="skip">
- <operation>
- <search position="end" />
- <add><![CDATA[$txt['ip_already_registered_once'] = 'According to our database records there is already an account registered from this ip: %s.';]]></add>
- </operation>
- </file>
- </modification>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement