We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Is there anything like Evo's WebLoginPE to facilitate front-end user management in Revo?

    Need to be able to change status, password and group assignment, along with a few custom fields.

    This question has been answered by benmarte. See the first response.

      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
    • discuss.answer
      Susan, I have done this using Logins Update Profile and Change Password snippets and some custom code and it works great.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
      • Good. I wasn't sure if the Update Profile allowed a Manager user to edit arbitrary users.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • I had to create a custom snippet to list all user groups and it's users in order to edit the selected user but most of the hard work was already done by UpdateProfile snippet.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
          • Thanks. This isn't a priority issue at the moment, but it's good to know that most of the work is already done wink
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
            • Hey Benmarte - I'm gonna need to implement something like this and thought probably Update Profile could do the trick and I can see how possibly the extra Peoples http://rtfm.modx.com/extras/revo/peoples could help list the users.

              But any other information you could share would be useful.

              Basically my project needs the ability for a site admin to be to create new users and edit them from the front end.
                Helen Warner
                Number one pixel!
                Proud to be linked with MODX at Crimson Pixel
              • Looks as if pdoUsers would be a useful snippet for getting profile information on the users now need to find a solution to actually being able to update a profile. Have added a feature request https://github.com/bezumkin/pdoTools !
                  Helen Warner
                  Number one pixel!
                  Proud to be linked with MODX at Crimson Pixel
                  • 4172
                  • 5,888 Posts
                  what is the reason, that it needs to be at frontend?
                  At backend a MIGXdb - CMP could probably do what you want.
                  From frontend a form and formit with a custom-hook like formit2db or a hook which runs a user - create/update processor could do it.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                  • Thus is a client request - wants a website to manage users rather than utilising back end!

                    Did think about formit hook as a possibility too.
                    Getting modUser attributes isn't really a problem to display frontend it's more being able to modify them.

                    With UpdatePrrofile snippet you need to be logged in as that user for it work.
                      Helen Warner
                      Number one pixel!
                      Proud to be linked with MODX at Crimson Pixel
                      • 4172
                      • 5,888 Posts
                      something like this could be a start for a formit-hook (untested):

                      <?php
                      
                      $success = true;
                      $data = $hook->getValues();
                      $extended = array();
                      
                      foreach ($data as $key => $value) {
                          $field = explode('.', $key);
                      
                          if (count($field) > 1) {
                              //extended field (json-array)
                              if ($field[0] == 'Profile_extended') {
                                  $extended[$field[1]] = $value;
                                  unset($data[$key]);
                              }
                          } elseif (substr($key, 0, 8) == 'Profile_') {
                              $data[substr($key, 8)] = $value;
                              unset($data[$key]);
                          }
                      
                      }
                      $data['extended'] = $extended;
                      
                      //$data['email'] = $data['Profile_email'];
                      
                      $response = $modx->runProcessor('security/user/update', $data);
                      
                      if ($response->isError()) {
                          $success = false;
                          $errormsg = $response->getMessage();
                      }
                      
                      return $success;
                      


                      user-fields needs to have the same input-name
                      profile-fields prefixed with 'Profile_'
                      extended fields prefixed with 'Profile_extended.'



                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!