From a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 2 Nov 2006 15:23:33 +0000 Subject: 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 --- phpBB/includes/functions_user.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 03a7ff19a5..96b7fb4cec 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -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))) -- cgit v1.2.1