Kevin J wrote:
> Hi,
>
> I've written a plugin that let users to use their login stored in a
> relational database to sign in the plone site. The login process passed,
> but when the I was redirected to the portal, I got the following message:
>
> File
> "[...]/eggs/plone.app.layout-1.0.5-py2.4.egg/plone/app/layout/viewlets/common.py",
> line 178, in update
> fullname = member_info.get('fullname', '')
> AttributeError: 'NoneType' object has no attribute 'get'
>
> The following is the code in question:
> File: plone/app/layout/viewlets/common.py
> [quote]
> 1 if not self.anonymous:
> 2 member = portal_state.member()
> 3 userid = member.getId()
>
> 4 if sm.checkPermission('Portlets: Manage own portlets',
> self.context):
> 5 self.homelink_url = self.portal_url + '/dashboard'
> 6 else:
> 7 self.homelink_url = self.portal_url + '/author/' +
> quote_plus(userid)
>
> 8 member_info = tools.membership().getMemberInfo(member.getId())
> 9 fullname = member_info.get('fullname', '')
> 10 if fullname:
> 11 self.user_name = fullname
> 12 else:
> 13 self.user_name = userid
> [/quote]
> I traced the code, and found that after line 2, member is assigned with the
> username that I logged in with (the user in the external database), however,
> at line 8, member_info is None (because I don't have memberdata for that
> particular user), so line 9 gives me an error.
>
> How do I remedy this problem? i.e., how do I tell plone to read the member
> info stored in the external database? I've tried writing a
> PropertiesPlugin, but it doesn't work...
>
> Thanks,
>
>
>
Did you consider using/extending SQLPASPlugin?
http://plone.org/products/sqlpasplugin:jon
_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers