diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-03-08 15:49:13 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-03-08 15:49:13 +0000 |
| commit | fcec5b61daecb4a0174418d3851ee1e0e8a0d93c (patch) | |
| tree | 9c91c227d7110f962b5a469d2632c7898e0e8848 /phpBB/includes/ucp/ucp_pm_compose.php | |
| parent | 738d26f92c56198a22b3088bf1b0c3b641a990db (diff) | |
| download | forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.gz forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.bz2 forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.tar.xz forums-fcec5b61daecb4a0174418d3851ee1e0e8a0d93c.zip | |
again... some more fixes.
git-svn-id: file:///svn/phpbb/trunk@7150 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index b5cba63c97..e9c67bcccf 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -326,7 +326,7 @@ function compose_pm($id, $mode, $action) } // Handle User/Group adding/removing - handle_message_list_actions($address_list, $remove_u, $remove_g, $add_to, $add_bcc); + handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc); // Check for too many recipients if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1) @@ -907,9 +907,9 @@ function compose_pm($id, $mode, $action) /** * For composing messages, handle list actions */ -function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc) +function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove_g, $add_to, $add_bcc) { - global $auth, $db; + global $auth, $db, $user; // Delete User [TO/BCC] if ($remove_u) @@ -956,7 +956,13 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ if (sizeof($usernames)) { $user_id_ary = array(); - user_get_id_name($user_id_ary, $usernames); + user_get_id_name($user_id_ary, $usernames, array(USER_NORMAL, USER_FOUNDER, USER_INACTIVE)); + + // If there are users not existing, we will at least print a notice... + if (!sizeof($user_id_ary)) + { + $error[] = $user->lang['PM_NO_USERS']; + } } // Add Friends if specified @@ -987,11 +993,19 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ AND user_allow_pm = 0'; $result = $db->sql_query($sql); + $removed = false; while ($row = $db->sql_fetchrow($result)) { + $removed = true; unset($address_list['u'][$row['user_id']]); } $db->sql_freeresult($result); + + // print a notice about users not being added who do not want to receive pms + if ($removed) + { + $error[] = $user->lang['PM_USERS_REMOVED_NO_PM']; + } } } } |
