Issue Update Plone 4.0 to 5.0.4

Hello,

I 'am trying to update plone 4.0 to 5.0.4 but I have an issue when I'am trying it.

I have this error message, i already try lot of thing but no one work.

This message appeat when I am trying to update the web site :


Actual config
4307
Last config
5015

Please can you help me see the message below:


Ran upgrade step: Upgrade mail control panel settings
Upgrade aborted. Error:
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-5.0.4-py2.7.egg/Products/CMFPlone/MigrationTool.py", line 268, in upgrade
step['step'].doStep(setup)
File "/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.8.2-py2.7.egg/Products/GenericSetup/upgrade.py", line 166, in doStep
self.handler(tool)
File "/usr/local/Plone/buildout-cache/eggs/plone.app.upgrade-1.3.24-py2.7.egg/plone/app/upgrade/v50/betas.py", line 196, in upgrade_security_controlpanel_settings
'use_email_as_login', False)
File "/usr/local/Plone/buildout-cache/eggs/plone.registry-1.0.3-py2.7.egg/plone/registry/recordsproxy.py", line 45, in setattr
self.registry[full_name] = value
File "/usr/local/Plone/buildout-cache/eggs/plone.registry-1.0.3-py2.7.egg/plone/registry/registry.py", line 46, in setitem
self.records[name].value = value
File "/usr/local/Plone/buildout-cache/eggs/plone.registry-1.0.3-py2.7.egg/plone/registry/record.py", line 89, in _set_value
notify(RecordModifiedEvent(self, oldValue, value))
File "/usr/local/Plone/buildout-cache/eggs/zope.event-3.5.2-py2.7.egg/zope/event/init.py", line 31, in notify
subscriber(event)
File "/usr/local/Plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/event.py", line 24, in dispatch
zope.component.subscribers(event, None)
File "/usr/local/Plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 136, in subscribers
return sitemanager.subscribers(objects, interface)
File "/usr/local/Plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/registry.py", line 321, in subscribers
return self.adapters.subscribers(objects, provided)
File "/usr/local/Plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
subscription(*objects)
File "/usr/local/Plone/buildout-cache/eggs/plone.registry-1.0.3-py2.7.egg/plone/registry/events.py", line 62, in redispatchInterfaceAwareRecordEvents
adapters = subscribers((proxy, event), None)
File "/usr/local/Plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 136, in subscribers
return sitemanager.subscribers(objects, interface)
File "/usr/local/Plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/registry.py", line 321, in subscribers
return self.adapters.subscribers(objects, provided)
File "/usr/local/Plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
subscription(*objects)
File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-5.0.4-py2.7.egg/Products/CMFPlone/controlpanel/events.py", line 126, in handle_use_email_as_login
migrate_to_email_login(context)
File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-5.0.4-py2.7.egg/Products/CMFPlone/controlpanel/utils.py", line 28, in migrate_to_email_login
pas.updateLoginName(user_id, login_name)
File "/usr/local/Plone/buildout-cache/eggs/Products.PluggableAuthService-1.11.0-py2.7.egg/Products/PluggableAuthService/PluggableAuthService.py", line 1276, in updateLoginName
self._updateLoginName(user_id, login_name)
File "/usr/local/Plone/buildout-cache/eggs/Products.PluggableAuthService-1.11.0-py2.7.egg/Products/PluggableAuthService/PluggableAuthService.py", line 1323, in _updateLoginName
"Possibly duplicate." % (user_id, login_name))
ValueError: Cannot update login name of user 'stag' to 'email@test.fr'. Possibly duplicate.
End of upgrade path, main migration has finished.
The upgrade path did NOT reach current version.
Migration has failed

Plone Foundation Code of Conduct