You can't. IEnumerable<T>
can only be iterated.
In your second example, you can remove from original collection by iterating over a copy of it
foreach(var u in users.ToArray()) // ToArray creates a copy
{
if(u.userId != 1233)
{
users.Remove(u);
}
}