CRM-14246 - event on behalf - alter function that assigns events to cope...

... with string or array