Propagate get_user_model exception from get_user

Fixes #21439
Merge pull request #1920 from mattrobenolt/unboundlocalerror

Fixed #21439 -- Propagated get_user_model exception from get_user