Only try deleting the calendar events if the id is defined
Fix some inconsistencies in SQL requests building
In scheduler_get_attendants, use user_picture::fields to make sure fullname() always works
Use user_picture::fields everywhere possible instead of hardcoding the user name fields