[Product-Developers] [PAS] auth'ed against relational db, but...
kevin.jingqiu at caseware.com
Wed Jul 23 19:57:24 UTC 2008
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:
line 178, in update
fullname = member_info.get('fullname', '')
AttributeError: 'NoneType' object has no attribute 'get'
The following is the code in question:
1 if not self.anonymous:
2 member = portal_state.member()
3 userid = member.getId()
4 if sm.checkPermission('Portlets: Manage own portlets',
5 self.homelink_url = self.portal_url + '/dashboard'
7 self.homelink_url = self.portal_url + '/author/' +
8 member_info = tools.membership().getMemberInfo(member.getId())
9 fullname = member_info.get('fullname', '')
10 if fullname:
11 self.user_name = fullname
13 self.user_name = userid
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...
View this message in context: http://n2.nabble.com/-PAS--auth%27ed-against-relational-db%2C-but...-tp579153p579153.html
Sent from the Product Developers mailing list archive at Nabble.com.
More information about the Product-Developers