[Product-Developers] Membrane and the gone getUserAuthProvider
Maurits van Rees
m.van.rees at zestsoftware.nl
Tue Feb 26 22:22:29 UTC 2013
Op 29-01-13 20:55, Maurits van Rees schreef:
> Op 25-01-13 16:53, Luca Fabbri schreef:
>> Hi all,
>>
>> I'm porting a 3rd party remember/membrane Pone 3 product to Plone 4.
>>
>> The only thing is not going is a call to a getUserAuthProvider of the
>> membrane_tool. This method has been totally removed starting from 2.0
>> generation of the product.
>> However there's not HISTORY line about this and no information about
>> what to use instead.
>> Also: documentation on the web (like
>> http://developer.plone.org/members/membrane.html#getting-plone-member-from-membraneuser-or-owner-record)
>>
>> is still using it.
>>
>> I'm trying to not deeply enter in the application logic (for many
>> reason). What I must use instead?
>>
>> Any suggestion or example?
>
> Sounds like a mistake in membrane. I have forwarded it to the remember
> mailing list:
> http://www.coactivate.org/projects/remember/lists/remember/archive/2013/01/1359489194154/forum_view
The getUserAuthProvider implementation was actually already removed in
2009. See
https://github.com/collective/Products.membrane/commit/572299287d5e2ab58fe8162a1325a68e535006b3
You should use getUserObject instead. This functions the same way, but
it also accepts an optional user_id argument:
- def getUserAuthProvider(self, login, brain=False):
+ def getUserObject(self, login=None, user_id=None, brain=False):
I have updated the interface to reflect this:
https://github.com/collective/Products.membrane/commit/3ec998e9f022e6f56969a57a32246644178f152f
I will probably do a release this week or the next.
--
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl
More information about the Product-Developers
mailing list