MDL-29938 get_users - search users external function
MDL-29938 don't validate return user info against PARAM_USERNAME as PARAM_USERNAME only apply to manual authentication (and web service)
MDL-29938 Fix typo bypassing some code + remove misplaced code in deprecated function + some code cleaning
MDL-29938 ignore invalid keys