Commit 1ea46dd1 authored by Ivan Tyagov's avatar Ivan Tyagov

Send properly email notofication.

parent 2b92f990
...@@ -88,7 +88,10 @@ login, password = context.CredentialRequest_createUser()\n ...@@ -88,7 +88,10 @@ login, password = context.CredentialRequest_createUser()\n
# Update Local Roles\n # Update Local Roles\n
context.CredentialRequest_updateLocalRolesOnSecurityGroups()\n context.CredentialRequest_updateLocalRolesOnSecurityGroups()\n
\n \n
if portal_preferences.isPreferredSystemGeneratePassword():\n if password is not None:\n
if password.startswith(\'{SSHA}\'):\n
#password is encoded, set it to None to script witch send the password to user\n
password = None\n
# Send notification in activities only if we already generated and set password\n # Send notification in activities only if we already generated and set password\n
# else a Credential Recovery process will take care\n # else a Credential Recovery process will take care\n
context.activate(activity=\'SQLQueue\').CredentialRequest_sendAcceptedNotification(login, password)\n context.activate(activity=\'SQLQueue\').CredentialRequest_sendAcceptedNotification(login, password)\n
......
...@@ -90,10 +90,10 @@ if not person.getPassword():\n ...@@ -90,10 +90,10 @@ if not person.getPassword():\n
password = None\n password = None\n
module = portal.getDefaultModule(portal_type=\'Credential Recovery\')\n module = portal.getDefaultModule(portal_type=\'Credential Recovery\')\n
credential_recovery = module.newContent(\n credential_recovery = module.newContent(\n
portal_type="Credential Recovery",\n portal_type="Credential Recovery",\n
reference=login,\n reference=login,\n
destination_decision=person.getRelativeUrl(),\n destination_decision=person.getRelativeUrl(),\n
language=portal.Localizer.get_selected_language())\n language=portal.Localizer.get_selected_language())\n
credential_recovery.submit()\n credential_recovery.submit()\n
else:\n else:\n
# system should generate a password\n # system should generate a password\n
...@@ -111,10 +111,6 @@ else:\n ...@@ -111,10 +111,6 @@ else:\n
#Check assignment for the current instance\n #Check assignment for the current instance\n
person.Person_validateGlobalUserAccount()\n person.Person_validateGlobalUserAccount()\n
\n \n
if password is not None and password.startswith(\'{SSHA}\'):\n
#password is encoded, set it to None to script witch send the password to user\n
password = None\n
\n
return login, password\n return login, password\n
</string> </value> </string> </value>
</item> </item>
......
381 382
\ No newline at end of file \ 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