[Product-Developers] [PAS] auth'ed against relational db, but...

Kevin J kevin.jingqiu at caseware.com
Wed Jul 23 19:57:24 UTC 2008


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,


-- 
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 mailing list