Commit ed4b5c76 authored by Nicolas Delaby's avatar Nicolas Delaby

Use proper API to get a connected user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43726 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4426961a
......@@ -55,13 +55,12 @@ from AccessControl import getSecurityManager\n
portal = context.getPortalObject()\n
\n
# Search current user ID\n
user_id = getSecurityManager().getUser().getId()\n
logged_in_user_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
source = None\n
person_subordination = None\n
for person in portal.portal_catalog(reference=user_id, portal_type=\'Person\'):\n
source = person.getRelativeUrl()\n
person_subordination = person.getSubordination()\n
break\n
if logged_in_user_value is not None:\n
source = logged_in_user_value.getRelativeUrl()\n
person_subordination = logged_in_user_value.getSubordination()\n
\n
start_date = DateTime()\n
destination = context.getRelativeUrl()\n
......
523
\ No newline at end of file
525
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment