docs: public Record getUserRegistration()
      {
          Record recUserRegistration = m_app.getUserRegistration();
  
          if (((recUserRegistration.getEditMode() == Constants.EDIT_CURRENT) ||
              (recUserRegistration.getEditMode() == Constants.EDIT_IN_PROGRESS))
              && ((m_app.getUserID() != null) && (!recUserRegistration.getField(UserRegistrationModel.USER_ID).isNull())
                      && (m_app.getUserID().equals(recUserRegistration.getField(UserRegistrationModel.USER_ID).toString())) &&
                  (recUserRegistration.getField(UserRegistrationModel.CODE).toString().equalsIgnoreCase(m_strKey))))
          { // Key is current... no need to read
          }
          else
          {
              if (recUserRegistration.getEditMode() != Constants.EDIT_NONE)
                  if (recUserRegistration.isModified(false))
              { // flush the current property (if changed)
                  try   {
                      if (recUserRegistration.getEditMode() == Constants.EDIT_ADD)
                          recUserRegistration.add();
                      else
                      {
                          if (recUserRegistration.getEditMode() == Constants.EDIT_CURRENT)
                              recUserRegistration.edit();
                          recUserRegistration.set();
                      }
                  } catch (DBException ex)    {
                      ex.printStackTrace();
                  }
              }
      
              if (m_strKey == null)
                  return null;
              ((ReferenceField)recUserRegistration.getField(UserRegistrationModel.USER_ID)).setString(m_app.getUserID());
              recUserRegistration.getField(UserRegistrationModel.CODE).setString(m_strKey);
              recUserRegistration.setKeyArea(UserRegistrationModel.USER_ID_KEY);
              try   {
                  boolean bFound = recUserRegistration.seek("=");
                  if (!bFound)
                  {   // Key not found, add a new one
                      recUserRegistration.addNew();
                      ((ReferenceField)recUserRegistration.getField(UserRegistrationModel.USER_ID)).setString(m_app.getUserID());
                      recUserRegistration.getField(UserRegistrationModel.CODE).setString(m_strKey);
                  }
              } catch (DBException ex)    {
                  ex.printStackTrace();
              }
          }
          return recUserRegistration;
      }