Check user in security context before getting the ID
Check user in security context before getting the ID

This commit fix a potential nil pointer issue when trying to read User
ID from security context

Signed-off-by: Daniel Jiang <b8e1ca884a84f218767196db52915b5edb9f310e@vmware.com>

wy65701436/harbor,reasonerjt/harbor,wy65701436/harbor,wy65701436/harbor,wy65701436/harbor,wy65701436/harbor,reasonerjt/harbor,wy65701436/harbor,reasonerjt/harbor,reasonerjt/harbor,reasonerjt/harbor,reasonerjt/harbor