vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Search by User ID (admin panel) (https://vborg.vbsupport.ru/showthread.php?t=39661)

KuraFire 06-08-2002 10:00 PM

Search by User ID (admin panel)
 
** Updated April 9th, 5:01 PM, CET **

For those of you who want to search users by their ID directly:


open admin/user.php and find this line:

PHP Code:

makeinputcode("User Name contains","ausername"); 

Add ABOVE that, this bit:

PHP Code:

  // user id search hack
  
makeinputcode("User ID is","auserid");
  
// end user id search hack 


Then, in the same file, find:

PHP Code:

if ($usergroupid!=-and $usergroupid!="") { 

Add ABOVE that, this bit:

PHP Code:

  // user id search hack
  
if ($auserid!="" && !is-numeric($auserid)){
      echo 
"Invalid user ID, please go back and try again.";
      exit;
  }
  if (
is-numeric($auserid)) {
    
$condition.=" AND user.userid=$auserid";
  }
  
// end user id search hack 

** BECAUSE vB.ORG IS BEING A BIATCH, YOU WILL HAVE TO CHANGE THE - IN is-numeric (2 occurances) TO AN UNDERSCORE ( _ ) IN THE ABOVE SECTION OF CODE!!! **

Save & upload admin/user.php - that's it. :):up:

You can now search users by their ID and get sent to their edit page right away.

Smoothie 06-09-2002 08:21 PM

How about adding this for moderators? To search by userid in the mod/index.php

Kickstand 06-09-2002 08:21 PM

Thanks KF !!
Great turn around time. What 5 minutes?

KuraFire 06-09-2002 08:48 PM

Lessee, I received your request at 11:01 PM, and posted this thread at 11:07.

6 minutes, that's pretty doable :)


Smoothie: erm, I might look into that, but then, I might not. It's not much use, really, if you ask me...

Chris M 06-10-2002 09:20 AM

Nice...

*installs*

Satan

KuraFire 06-10-2002 11:45 AM

Eek! I made a big oopsy in the above code, which caused the search function in your AP to, well, not work.

The first post is improved now, it's a tiny alteration:

PHP Code:

  if (!intval($auserid)){ 

should be:

PHP Code:

  if (($auserid!="") AND (!intval($auserid))){ 

That's the fix, it's error-free, now :)

Boofo 06-12-2002 08:50 PM

I have 21 users (new board, not open to public yet) and it shows the 18th user fine but if I try to find ID 19, 20 or 21 it says there is no matches. Any ideas?

KuraFire 06-14-2002 09:21 AM

your 19th, 20th and 21st members have higher ID's because you deleted some accounts?

I just checked your board and your 22nd member has the id 25, so you clearly deleted some users along the way.

Boofo 06-14-2002 09:39 AM

Thta is apparently what the problem is. Is there any way to take the gaps out of the user table in the database for that?

Quote:

Originally posted by KuraFire
your 19th, 20th and 21st members have higher ID's because you deleted some accounts?


I just checked your board and your 22nd member has the id 25, so you clearly deleted some users along the way.


KuraFire 06-14-2002 11:21 AM

!!

why on EARTH would you want that?!

that would make your whole system unstable and illogical and (insert 25 other bad aspects here).

In other words: doing that is like unleashing hell on your board. It's Extremely impractical, too..


All times are GMT. The time now is 10:05 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.01696 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete