kettari / authgoogle

Google Authentication Plugin for DokuWiki
13 stars 17 forks source link

Implemented `getUserData` to return the user array when given user name. #10

Closed daaain closed 10 years ago

daaain commented 10 years ago

When I started using dokuwiki-authorlist plugin I noticed that the emails of authors aren't linked.

This is because with plain auth user ID and user name is the same, so passing in user name as parameter successfully retrieves the user from the array as it maps with the keys using user ID.

However with Google auth ID is different from name, so in order to be able to get user data (using meta/contributors for example) we need to loop through the array and look the user up by name.

daaain commented 10 years ago

Actually, don't merge this :(

While it does work nicely with the dokuwiki-authorlist plugin, but only while the session lasts as it seems to mess up something in the Dokuwiki internals so on the next log in it won't give the right ACL permissions etc to the user.

I'll leave it here as it would be nice if there was a way to eat the cake and have it, but at this point I'm not quite sure how to make it work.

kettari commented 10 years ago

OK, got it. I will not merge it for now. If you find the solution, please get back, you're always welcome :)