vielleicht ist hier jemand der mehr Ahnung von SQL hat ?
Habe einen Mod gefunden der sehr nützlich, bestimmt auch für Euch ist, allerdings hat er ein Problem:
Der MOD: http://www.lefkeo.info/viewtopic.php?t=6
Der User bekommt damit gleich angezeigt ob der Benutzername noch verfügbar ist, aber leider prüft die Abfrage nicht die Tabelle disallow_username.
Ich habe das Probiert:
hier der original code:
Code: Alles auswählen
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// We check if the username exist or not
[b]$sql = 'SELECT username FROM '.USERS_TABLE.' WHERE username = \''.$HTTP_GET_VARS['username'].'\'';[/b]if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query username list', '', __LINE__, __FILE__, $sql);
}
if( $db->sql_numrows($result) >= 1 )
{
echo '1';
}
else
{
echo '2';
}
$db->sql_freeresult($result);
Code: Alles auswählen
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// We check if the username exist or not
[b]$sql = 'SELECT username, disallow_username FROM ' . USERS_TABLE . ' , ' . DISALLOW_TABLE .' WHERE username AND disallow_username = \''.$HTTP_GET_VARS['username'].'\'';[/b] if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query username list', '', __LINE__, __FILE__, $sql);
}
if( $db->sql_numrows($result) >= 1 )
{
echo '1';
}
else
{
echo '2';
}
$db->sql_freeresult($result);
Bin kein SQL Experte aber vielleicht kann mir da jemand helfen ?
Gruss Jens