I update sharepoint list by code. In list I have people picker field. It allows multi userand SharePoint group also. Before allowing multi user and group it was allowed only single user. So I used below code amd it was worked fine.
SPUser user = web.EnsureUser("ApproverField"); listItem["Approver"]=user; web.AllowUnsafeUpdates = true; listItem.Update();
Now after changed to allow multi user and SharePoint group this code doesn't work. Exception fires at web.EnsureUser(). So can anyone suggest to make the change?