79107995

Date: 2024-10-20 20:27:16
Score: 1.5
Natty:
Report link

I doesn't think there is a way to make it optional. I would remove the attribute and instead use User.Identity.IsAuthenticated to check whether the request were send from an authenticated user and then access the user id.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Suiram1