equal
deleted
inserted
replaced
641 switch($_GET['type']) |
641 switch($_GET['type']) |
642 { |
642 { |
643 case 'username': |
643 case 'username': |
644 if ( isset($_GET['userinput']) && strlen($_GET['userinput']) >= 3 ) |
644 if ( isset($_GET['userinput']) && strlen($_GET['userinput']) >= 3 ) |
645 { |
645 { |
|
646 if ( $session->user_id == 1 && getConfig('autofill_username_for_guests', 0) != 1 ) |
|
647 break; |
|
648 |
646 $search = '%' . escape_string_like($_GET['userinput']) . '%'; |
649 $search = '%' . escape_string_like($_GET['userinput']) . '%'; |
647 $lsearch = strtolower($search); |
650 $lsearch = strtolower($search); |
648 $min_id = ( isset($_GET['allow_anon']) && $_GET['allow_anon'] == '1' ) ? '1' : '2'; |
651 $min_id = ( isset($_GET['allow_anon']) && $_GET['allow_anon'] == '1' ) ? '1' : '2'; |
649 $q = $db->sql_query('SELECT username FROM ' . table_prefix . "users WHERE (" . ENANO_SQLFUNC_LOWERCASE . "(username) LIKE '$lsearch' OR username LIKE '$search') AND user_id >= $min_id"); |
652 $q = $db->sql_query('SELECT username FROM ' . table_prefix . "users WHERE (" . ENANO_SQLFUNC_LOWERCASE . "(username) LIKE '$lsearch' OR username LIKE '$search') AND user_id >= $min_id"); |
650 if ( !$q ) |
653 if ( !$q ) |