1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 20:40:24 +02:00

some updates; and hopefully not completely breaking redirects (again). :D You know, i like breaking things.

git-svn-id: file:///svn/phpbb/trunk@6544 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-02 15:23:33 +00:00
parent 21a002e4ac
commit a3bf1ed63e
9 changed files with 79 additions and 24 deletions

View File

@@ -12,7 +12,7 @@
* Obtain user_ids from usernames or vice versa. Returns false on
* success else the error string
*/
function user_get_id_name(&$user_id_ary, &$username_ary)
function user_get_id_name(&$user_id_ary, &$username_ary, $only_active = false)
{
global $db;
@@ -44,6 +44,12 @@ function user_get_id_name(&$user_id_ary, &$username_ary)
$sql = 'SELECT user_id, username
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set($sql_where, $sql_in);
if ($only_active)
{
$sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
}
$result = $db->sql_query($sql);
if (!($row = $db->sql_fetchrow($result)))