I have users registered on the website and users that are logging in using an external account (plone.app.ldap is used).
How can I get the type of logged in user?
membership = getToolByName(self.context, 'portal_membership')
authenticated_user = membership.getAuthenticatedMember()
(Pdb) authenticated_user
<MemberData at /mywebsite/portal_memberdata/myuserid used for /mywebsite/acl_users>
I have the logged in user, but no idea how to find how it is registered.
(It seems membership_tool.listMembers()
gives me the registered users list. Maybe I can use this...)
My goal is to send the type of account to Google Analytics as custom dimension in a custom event and creating some nice reports (the type of account will be a filter for the results).