You need a plugin to do something like that. You might want to have a look at the new_user_identity plugin that ships with Roundcube. That uses LDAP to populate the user's identity information which I know is not exactly what you are looking for but its a starting point.