Query to validate hash password from user source database

Had to figure this out myself not too long ago