Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-10459

onCreateUser.js:emailUser assumes that a mail address has been configured for the created object

    Details

      Description

      If the managed.json has been modified to remove the requirement for a mail address to be supplied when creating a user object then when the default onCreate scripts are called, we attempt to invoke onCreateUser.js:emailUser to provide a Welcome Email but as the object.mail attribute is null, this simply hangs the OpenIDM instance:

      INFO: Email Var: {subject=Your account has been created, from=test@test.com, to=null, type=text/html}
      

      While it could be argued that after changing the managed.json, any scripts should be checked and modified I believe we should be checking for this situation and logging it if/when it occurs, i.e. check whether object.mail is null and log appropriately.

      To replicate:

      • Start OpenIDM 5.5.0 (or 6.0.0)
      • Configure external/email via the UI
      • Remove requirement for managed/user/mail
      • Create a new managed/user

      Expected Behaviour:

      Either:
      A) User Created successfully, log message added
      B) Error thrown from script as no mail attribute is available

      Actual:
      No response from UI after clicking Save

        Attachments

          Activity

            People

            • Assignee:
              katie.gonzalez Katie Gonzalez
              Reporter:
              tom.wood Tom Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: