mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Remove duplicate username entries
git-svn-id: file:///svn/phpbb/trunk@3853 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4818a5b065
commit
5e6fe84a2c
1 changed files with 1 additions and 1 deletions
|
@ -708,7 +708,7 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
|
||||||
$sql = 'SELECT user_id AS id, username AS name
|
$sql = 'SELECT user_id AS id, username AS name
|
||||||
FROM ' . USERS_TABLE . '
|
FROM ' . USERS_TABLE . '
|
||||||
WHERE ';
|
WHERE ';
|
||||||
$sql .= ($submit == 'add_options') ? ' username IN (' . implode(', ', preg_replace('#^[\s]*?(.*?)[\s]*?$#', "'\\1'", explode("\n", $ug_data[0]))) . ')' : ' user_id ' . ((is_array($ug_data)) ? 'IN (' . implode(', ', $ug_data) . ')' : '= ' . $ug_data);
|
$sql .= ($submit == 'add_options') ? ' username IN (' . implode(', ', array_unique(preg_replace('#^[\s]*?(.*?)[\s]*?$#', "'\\1'", explode("\n", $ug_data[0])))) . ')' : ' user_id ' . ((is_array($ug_data)) ? 'IN (' . implode(', ', $ug_data) . ')' : '= ' . $ug_data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'group':
|
case 'group':
|
||||||
|
|
Loading…
Add table
Reference in a new issue