summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--privatemsg.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/privatemsg.module b/privatemsg.module
index 1cbabb2..7b49727 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -85,14 +85,16 @@ function _privatemsg_generate_user_array($string, $slice = NULL) {
$participants = array();
foreach ($users as $uid) {
// If it is an integer, it is a user id.
- if ((int)$uid > 0 && ($account = array_shift(privatemsg_user_load_multiple(array($uid))))) {
+ $user_ids = privatemsg_user_load_multiple(array($uid));
+ if ((int)$uid > 0 && ($account = array_shift($user_ids))) {
$participants[privatemsg_recipient_key($account)] = $account;
}
elseif (strpos($uid, '_') !== FALSE) {
list($type, $id) = explode('_', $uid);
$type_info = privatemsg_recipient_get_type($type);
if ($type_info && isset($type_info['load']) && is_callable($type_info['load'])) {
- if ($participant = array_shift($type_info['load'](array($id)))) {
+ $temp_load = $type_info['load'](array($id));
+ if ($participant = array_shift($temp_load)) {
$participants[privatemsg_recipient_key($participant)] = $participant;
}
}