timwaters / omniauth-mediawiki

MediaWiki OAuth strategy for Omniauth, used for all wikimedia.org wikis (e.g. commons.wikimedia.org , wikipedia.org) with the oauth extension installed
Other
4 stars 9 forks source link

Extract the email address from raw_info #4

Closed tomhughes closed 8 years ago

tomhughes commented 8 years ago

This copies the email address from raw_info to the standard place in the main info hash.

timwaters commented 8 years ago

great stuff - will review this week, many thanks. Do you know if it works when the user doesn't have an email address (which I think is possible with mediawiki)? Is it set to nil in that case?

tomhughes commented 8 years ago

So long as the raw_info hash exists, which it should, then it will just be nil. Obviously you could make it conditional to drop the key altogether but it doesn't make much difference when somebody looks it up unless they try hard to distinguish an missing key from a key with a nil value.

timwaters commented 8 years ago

Thanks! :+1: