Currently you could add entries to user_language table for login names which dont exist. Please review my patch.
Regards
Attachment:
checkuser-before-set-language.patch
I prefer not to make public the function userExists - also the function is only avilable to super user so cant be abused