vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Changing Login Strikes? (https://vborg.vbsupport.ru/showthread.php?t=182556)

Thomas P 06-15-2008 11:34 AM

Changing Login Strikes?
 
Hello,

I want to change the strikes to 3 times and the time to wait to 25 Minutes.

Is the code all in functions_login.php?

Is this all?

Code:

        if ($strikes['strikes'] >= 3 AND $strikes['lasttime'] > TIMENOW - 1500)
        { //they've got it wrong 5 times or greater for any username at the moment

                if (($strikes_user['strikes'] % 3 == 0) AND $user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
                { // they've got it wrong 5 times for this user lets email them
                        $ip = IPADDRESS;
                        eval(fetch_email_phrases('accountlocked', $user['languageid']));
                        vbmail($user['email'], $subject, $message, true);
                }

                // the user is still not giving up so lets keep increasing this marker
                exec_strike_user($username);

                if (!$supress_error)
                {
                        eval(standard_error(fetch_error('strikes', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'])));
                }
                else
                {
                        return false;
                }
        }
        else if ($strikes['strikes'] > 3)
        { // a bit sneaky but at least it makes the error message look right
                $strikes['strikes'] = 3;
        }

This should do it, right?

Thanks,
Tom

Opserty 06-15-2008 11:38 AM

Why don't you just test it, on a test board, and find out?

Thomas P 06-15-2008 12:13 PM

Outcome is a bit confusing, so I ask.

One account has 4 tries, another only 2 when I change it to a.m. code.
Maybe same IP, maybe wrong code part... ?

Thomas P 06-20-2008 07:33 PM

anyone? :(


All times are GMT. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01159 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete