I trying to do something I know is not a difficult task, but I'm no mysql/php guru either.
We are serious World of Warcraft addicts, with a fairly decent guild website.
I've setup a phpBB forum (a few mods), and WoWroster (serious mods).
I'm pretty good at picking apart code and piecing it together, but this one has me confused.
Both the phpBB and the WoWRoster share the same db, so authentication is the same. Table prefixes separate them, phpbb and roster .
Since the forums are meant for guild members only, and the roster list is updated daily, I would like the phpBB registration to check first IF the $username is found in the roster_members ['name'] before continuing with the rest of the registration process. Maybe with error message of, $lang['GuildMember_invalid']
Basically the REVERSE of what phpBB does to check if the username is already taken in the "phpBB member" list.
I believe the file to be edited to do this is the forums/includes/functions_validate.php in phpBB.
I have no clue how to set this up. The extent of my skill is I can make a list echo of the roster members. (mysql stuff has me baffled)
Can anyone help at all?
I've put the functions_validate.php into a text file as it is a fairly long code.
http://www.golwow.net/phpbbvalidation.txt
Some code I've been playing with but not sure where to put it or if it will work.
Since the WoWroster and phpBB are in the same database.
it can use the global info to connect I think.
global $db, $lang
$rosterquery=" SELECT * FROM roster_members WHERE name='$username'";
$rosterresult=mysql_query($rosterquery);
$rosternum=mysql_numrows($rosterresult);
$error = true;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['GuildMember_invalid'];