This is what i have THUS far.
usernames are checked in /includes/functions_user.php of phpbb3.
This is the piece of script check if the name is open in phpbb3.
$sql = 'SELECT username
FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $db->sql_escape($clean_username) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
return 'USERNAME_TAKEN';
}
I've been trying a roster check before and after with less than desirable result.
Been trying to add this to the script, but it just goes white screen when it goes to run it.
$sql = "SELECT name
FROM roster_members
WHERE LOWER(name) = '" . $db->sql_escape($clean_username) . "'";
if ($result = $db->sql_query($sql))
{
if ($db->sql_numrows($result) < 1)
{
$db->sql_freeresult($result);
return 'USERNAME_TAKEN';
}
}
$db->sql_freeresult($result);
Any Ideas?