Is it possible to retrieve the user_id of the user who made a given revision? I see that there is a ids element to rvprop, and a user element, but neither of these give me the user_id. Alternatively, is there a way I'm not seeing to map a user name to user_id?
Thanks for your help,
Ian
Ian Pye schreef:
Is it possible to retrieve the user_id of the user who made a given revision? I see that there is a ids element to rvprop, and a user element, but neither of these give me the user_id. Alternatively, is there a way I'm not seeing to map a user name to user_id?
Thanks for your help,
Ian
Other users' user IDs are more or less private, and shouldn't be available anywhere. You can get your own user ID through meta=userinfo or by going to Special:Preferences.
Roan Kattouw (Catrope)
Roan Kattouw wrote:
Ian Pye schreef:
Is it possible to retrieve the user_id of the user who made a given revision? I see that there is a ids element to rvprop, and a user element, but neither of these give me the user_id. Alternatively, is there a way I'm not seeing to map a user name to user_id?
Thanks for your help,
Ian
Other users' user IDs are more or less private, and shouldn't be available anywhere. You can get your own user ID through meta=userinfo or by going to Special:Preferences.
Roan Kattouw (Catrope)
Are they? Please see http://en.wikipedia.org/wiki/Special:Export/Main_Page (and the XML dumps) - you can usually get the user ID from his user page this way, or any other page he has edited; also note that the Stewards can use the user IDs instead of the user names. I think it's better to have the user IDs public, to have a unique identifier of each user, and not to have problems with non-latin usernames. You can't do anything dangerous with the user ID (if you can, this is a bug which should be fixed, but I know no such bug).
P.S. This discussion should probably be in wikitech-l.
Rotem Liss schreef:
Are they? Please see http://en.wikipedia.org/wiki/Special:Export/Main_Page (and the XML dumps) - you can usually get the user ID from his user page this way, or any other page he has edited; also note that the Stewards can use the user IDs instead of the user names. I think it's better to have the user IDs public, to have a unique identifier of each user, and not to have problems with non-latin usernames. You can't do anything dangerous with the user ID (if you can, this is a bug which should be fixed, but I know no such bug).
True. Still, what would you need the user ID for?
Roan Kattouw (Catrope)
On Wed, Feb 20, 2008 at 10:07 AM, Roan Kattouw roan.kattouw@home.nl wrote:
Rotem Liss schreef:
Are they? Please see http://en.wikipedia.org/wiki/Special:Export/Main_Page (and the XML dumps) - you can usually get the user ID from his user page this way, or any other page he has edited; also note that the Stewards can use the user IDs instead of the user names. I think it's better to have the user IDs public, to have a unique identifier of each user, and not to have problems with non-latin usernames. You can't do anything dangerous with the user ID (if you can, this is a bug which should be fixed, but I know no such bug).
True. Still, what would you need the user ID for?
Personally, I am doing analysis on users' reputation and trust. In my program, these values are keyed off of users' ids, not users' names. This is because it is easier for me to work with numbers rather than unicode strings.
In general, I would argue that while it is possible to do without user IDs, there is no reason to, because they are already publicly available -- just not via the api -- and using numbers avoids the problems which non-ascii characters give.
Roan Kattouw (Catrope)
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org