Commit a8f96bdc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Vincent Pelletier

ERP5Form.PreferenceTool: use getId() instead of getIdOrUserName().

parent fe773036
......@@ -149,10 +149,10 @@ class PreferenceTool(BaseTool):
# reset a security manager without any proxy role or unrestricted method,
# wich affects the catalog search that we do to find applicable
# preferences.
actual_user = acl_users.getUser(user.getIdOrUserName())
actual_user = acl_users.getUserById(user.getId())
if actual_user is not None:
newSecurityManager(None, actual_user.__of__(acl_users))
tv_key = 'PreferenceTool._getSortedPreferenceList/%s/%s' % (user.getIdOrUserName(),
tv_key = 'PreferenceTool._getSortedPreferenceList/%s/%s' % (user.getId(),
sql_catalog_id)
if tv.get(tv_key, None) is None:
prefs = []
......@@ -284,7 +284,7 @@ class PreferenceTool(BaseTool):
return False
tv = getTransactionalVariable()
tv_key = 'PreferenceTool._isAuthenticationPolicyEnabled.%s' % getSecurityManager().getUser().getIdOrUserName()
tv_key = 'PreferenceTool._isAuthenticationPolicyEnabled.%s' % getSecurityManager().getUser().getId()
if tv.get(tv_key, None) is None:
_isAuthenticationPolicyEnabled = CachingMethod(_isAuthenticationPolicyEnabled,
id='PortalPreferences_isAuthenticationPolicyEnabled',
......
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