vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Checking Vbulletin username for db access (https://vborg.vbsupport.ru/showthread.php?t=35276)

ixian 02-21-2002 04:40 AM

Howdy,

First of all, my license information is stored in my profile and I am a fully paid up and legal user. I see requests for this all the time so I thought I'd mention it:)

Here's what I'd like to do:

I am so-so at mySQL and PHP. I have created a separate database called adminmod for game server authentication, and a php page where users can enter their information so it gets stored in said database.

First off, I want to restrict this page so ONLY registered forum members can read it. This part is no problem - I already know the php code ( if ($bbyuserinfo[' userid'] - etc, etc) that restricts access that way. I got that down and use that for other areas of my site already.

Here's where it gets tricky.

Once a registered member enters their information on the page, I don't want them to be able to come back willy-nilly and keep adding in more usernames. They get one game server registration per forum membership. So I need to do more than simply verify they are members.

I was thinking that if, when someone registered (there are three fields in the table - username, wonid, and clan), the page automatically grabbed their forum username and insterted it into a row in the same table in the adminmod database, then if that same person tried to register again, I could do a db lookup that saw that FORUM username was already in the database and deny registration.

I imagine this would work - but I am too much of a n00b to figure it out:) Through lots of reseach and flipping through manuals I managed to get this far, but now I am stuck.

Could any mySQL/php guru's out there help me? I'd even be willing to pay cash for your time, or buy you an Amazon gift certificate or something. I need the actual syntax that I can put in the php page that:

grabs forum username (without user intervention - obviously, some fine folks would enter in different names to bypass the system if they had the option)
checks to see if it's in specified table/row in db
denies submission if it is
inserts it into specified table/row in db if it isn't

Any takers?

Thanks!

ixian 02-22-2002 03:44 PM

**edited**

Ok, let's try this. Instead of me trying to be super-clever, I have gone to the basics.

Rather than create a whole new database, I've simply added some new tables to the vbulletin one to store the extra information I need. This, I found, makes intergrating it into the rest of my site much easier, among other things.

So here's what I need to know how to do:

On my game registration page, I have it set to check and make sure the person trying to access it is already a registered member of the site (they get the error_noregistration template if not). If they are, they are allowed to fill out the form with their game nickname, clan tag, etc. This then goes into the new tables I made and all is well.

What I need to do now is figure out how to stop them from registering if they have already done so. I figure - and I could be wrong here - that if I can set some sort of flag that tags a FORUM username as having already entered information into the game server table, I am set. Maybe a row in, say, the game server username table I created for the above that holds a bit - 0 for forum user has not entered information, 1 for they have - and it checks it before submission is allowed....?

Any ideas?

Thanks!


All times are GMT. The time now is 11:16 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.01057 seconds
  • Memory Usage 1,713KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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