Commit 3af8ecb5 authored by Piers Harding's avatar Piers Harding
Browse files

Reduce the selection of users in activity type lookup by removing deleted users.



This was especially important in ActivityTypeInstitutionmessage where it
was trying to mail to deleted users from $institution->addRequestFromUser().

Change-Id: I719bd2b86af76d2cc139a4354615a2d0383f8cfb
Signed-off-by: default avatarPiers Harding <piers@catalyst.net.nz>
parent 70227096
......@@ -117,7 +117,7 @@ function activity_get_users($activitytype, $userids=null, $userobjs=null, $admin
ON (aic.instance = ai.id AND aic.field = \'wwwroot\')
LEFT OUTER JOIN {host} h
ON aic.value = h.wwwroot
WHERE TRUE';
WHERE u.deleted = 0';
if (!empty($userobjs) && is_array($userobjs)) {
$sql .= ' AND u.id IN (' . implode(',',db_array_to_ph($userobjs)) . ')';
$values = array_merge($values, array_to_fields($userobjs));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment