in my eventreceiver project, itemAdded function, my code is going to add item to a second list but it is not working for some user with low privilege
SPSecurity.RunWithElevatedPrivileges(delegate ()
{
using (SPSite site = new SPSite(properties.SiteId))
{
using (SPWeb web = site.OpenWeb(properties.Web.ID))
{
web.AllowUnsafeUpdates = true;
//my code
web.AllowUnsafeUpdates = false;
}
}
}