diff --git a/product/ERP5Security/ERP5KeyAuthPlugin.py b/product/ERP5Security/ERP5KeyAuthPlugin.py
index c3b8ebd022753fcd5ff4490d632c1aae3eba08af..c156d9c11ca030432efb8a26ea063317e8198f90 100644
--- a/product/ERP5Security/ERP5KeyAuthPlugin.py
+++ b/product/ERP5Security/ERP5KeyAuthPlugin.py
@@ -342,7 +342,6 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
         if sm.getUser().getId() != SUPER_USER:
           newSecurityManager(self, self.getUser(SUPER_USER))
           try:
-            portal = self.getPortalObject()
             # get assignment list
             assignment_list = [x for x in user.contentValues(portal_type="Assignment") \
                                  if x.getValidationState() == "open"]