We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    How about everyone having a single registration and a single email address, but belonging to one or both user groups? Upgrading could just add them to the other user group.

    Selling the business would just take them out of the Service Providers user group, but optionally leave them in the other group.

    I'm not sure if you'd want to have a separate table for personal and business information or not. I think probably another table, so a sold business would just mean linking the record in the Business Info table to a different user. Either way, you could control what information was displayed by User Group membership.
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 38783
      • 571 Posts
      I accidentally deleted my original post! Bobs suggestion above is in response to this question.

      Thanks for the response Bob

      I am building a web site which will allow the following types of user registration.

      1. Service Providers who offer dog training services - service providers will be searchable and will be able to advertise.
      2. Individuals involved in dog training - they can publishing their own personal profiles on the site, but cannot advertise and will not show up in search results.

      So far we have taken registrations only from individuals. Now we need to move on to accepting registration from companies.

      I am using Bob Rays extUser to provide additional user fields to contain all the data that is input.

      Ideally, from my point of view (the person building the website) each type of account, 'individual' and 'service provider' would require a completely separate login, with a unique user name and email address.

      However, many of the individuals, some of whom have already registered, are also service providers.

      And some people whose first registration on the site will be as a service provider may, at a later date want to register as an individual.

      We could insist on them using different email addresses for each type of account, but I worry that many of them will be using the same email address for their business and for their personal life. If asked to provide a second email address in order to re-register on the site these people will give up and abandon the site.

      But if I allow people to register a personal account and then 'upgrade' that account to handle both their service provider information and their personal information the person and the business are permanently linked. What if they sell the business to someone else but want to retain their personal profile on the site?!

      Does any one have any experience of this type of situation? Am I worrying unnecessarily about the friction caused by expecting people to have access to more than one email address?

      Any thoughts gratefully received.

        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 38783
        • 571 Posts
        That sounds sensible. Could something like that be achieved using modResource to create the extra table with the required fields in it. Would I create the link between the user and the business by allocating a resource to them?
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 38783
          • 571 Posts
          Hello Bob, thank you for your thoughts about this yesterday. One of the issues that makes this a little more complex is that the users, both 'individual' and 'service providers' need to be able to edit their own information from the front end of the website.

          At the moment the individual users are able to edit their profiles with the extra fields provided by ClassExtender Class / modUser.

          I am now thinking that service provider information would be stored in a Resource that has the additional fields provided using ClassExtender Class / modResource.

          Each individual user who is also a service provider gets a resource (or resources if more than one business) allocated to them which they can edit using Newspublisher.

          However, I am not sure if Newspublisher can edit the fields created by extending modResource using your ClassExtender Class?

          If it can could you point me in the right direction to get it working?

          If it can't I suppose I would need to provide the extra information in TV's. I am worried that this might be slow though as there will be about 60 pieces of information per resource.

          One thing that might also influence whether I use TVs or extend modResource is that the information needs to be searchable by the users of the website. Is it easy to include extend modResource data in searches?
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 3749
            • 24,544 Posts
            No matter what, you definitely don't want to use TVs as the primary data store, because they're fairly horrible for searching and sorting.

            I don't think NewsPublisher will work with ClassExtender, but I can't remember for sure.

            One possible solution is to use ClassExtender to create the table, but use TVs for the Data input (with NewsPublisher) and have a plugin attached to OnDocFormSave that writes the data from the TVs to the extended table.

            This is kind of a hack, but it has certain advantages. The NewsPublisher setup is really easy, the pages display pretty simply with placeholders, and you've got the custom table for searching and sorting.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 38783
              • 571 Posts
              Hello Bob, Thank you.

              I have been playing with NewsPublisher today and am enjoying getting to grips with it.

              I think I'll prove to myself that I can achieve what I need to regarding user permissions to allow users to access and edit just their own page using data stored directly in the TVs and then look at using your hack to put the data in the Class Extender ext_resource_data table.

              Do you know if there is documentation anywhere that would explain how to give someone the ability to edit and save a resource in NewsPublisher without giving them Manager access?

              I have added your test Class Extender modResource table (ext_resource_data) and that has gone OK.

              Thank you very much for both your help and your superb extras.

                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 3749
                • 24,544 Posts
                Yep: As per the NewsPubisher docs, &ownPagesOnly=`1` in the NewsPublisher tag.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 38783
                  • 571 Posts
                  Yes, I've got the &ownPagesOnly=`1` in place. It's the more fiddly bit of the permissions that the user has. At the moment I am getting No Context Save_Document_Permission in the Edit button

                  I think I need to do a lot of reading about permissions!
                    If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                    email: [email protected] | website: https://andytough.com
                    • 3749
                    • 24,544 Posts
                    That should be the Policy attached to the Context Access ACL entry for the User Group of the user accessing NewsPublisher. I believe it would be the one for the 'web' context, though I'm not positive.

                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 38783
                      • 571 Posts
                        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                        email: [email protected] | website: https://andytough.com