Is there any function that gets the user's MAC address so I can record it as some authentication credential?
No.
Once you involve a layer 3 router, the original MAC address is no longer available / relevant.