View Full Version : Checking Usernames?

22 Dec 2009, 14:39
Is it possible to have an outside (non-vb4) script check the SQL database to see if a username exists and then based off a Yes/No scenario, change the usergroup of that said username to something else?

--------------- Added 1261570377 at 1261570377 ---------------

No one has any idea how to do this :(?

James Birkett
23 Dec 2009, 15:39
I'm confused as to what you're asking..

You want an external script to check if a username exists, then you want to change the usergroup of that username to something else?

So if the username "John" exists, you'd want to change John's usergroup to something else?

23 Dec 2009, 15:45
Basically, I want the ability to have a script that exists in my billing system for clients who registered on the forums. I created a usergroup that gives them access to special forums. I want them to activate this usegroup through an external script within the billing system so I don't have to manually verify them.

23 Dec 2009, 16:05
Well they would be logged in when they finish the form for paying or what ever you would just have a SQL statement something like

UPDATE "user" SET usergroup='10' WHERE userid = '" . $userid . "');

You will have to edit this with your code and variables.

23 Dec 2009, 18:33
That part I think I have down, but its the part of searching through the user row and creating a function that finds a user.