Fix crash when user is NULL