I've just added in the CVS the add_user function working with an associative array as it's suggested. It can be find here:
The name of the function is:
array mdl_user_delete_instances($userids, $idtype='idnumber')
The particles of the name are explained here: http://tracker.moodle.org/browse/MDL-13126?focusedCommentId=56209#action_56209
The function gets one mandatory param and am optional one, and returns an associative array of identifier=>boolean. The hot point of this function is that users can be identified by several fields:
-idnumber (in my point of view is the best way)
So, to implement this function we decided to allow all of them. The default is 'idnumber' but, you can pass an array of internal ids, usernames or emails too, just by specify it in the second parameter.