We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22221
    • 283 Posts
    I’ve modded the version 1.3 to move all the strings in a language file as done with weblogin, websignup and webchangepwd here

    Could you check my modifications, add this version to repository, and start with this version for further update ?

      • 2762
      • 1,198 Posts
      Quote from: YankeeDeuce at Oct 24, 2006, 07:46 PM

      Not sure if you are still looking for this, but I modified the snippet to include other fields.

      In webeditprofile.inc.php

      .............


      I’ve tried your modification and works nice for comment and other fields, but I ’cant upload Photo:
      I’ve changed this line to get upload form but I don’t know how to set path for upload avatar/foto.
      <td>Avatar:</td>
      <td>
      <input type="file" name="photo" class="inputBox" size="50" value="[+photo+]"></td>


      can you help me?
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 33033
        • 43 Posts
        I haven’t gotten it to upload a pic, I’m just using it as a field where members can enter the URL of a hosted image and use that. Once I get some time I’ll take a look and see if I can upload an image from the signup/edit profile page.
          • 18503
          • 45 Posts
          This is a great Snippet, very useful! When using this to update the profile, it works great, but for some reason my SMF_module doesn’t pick up on the changes (and modify the SMF profile, like the email address) unless I actually go into the Modx manager and click "save" on the web-user’s account. Any ideas?
            -dan
            http://wylio.com
            Wylio - Pictures for Bloggers
            • 5253
            • 17 Posts
            i know, this is q very old topic...sft!

            My problem with the WebEditProfil is the following:
            Webuser’s which are created by the Site Admin from the backend can edit their profile without any problems.
            If somebody registered via frontend and WebSignup, the EditProfile won’t work. It just shows a blank page. Only the following lines you’ll find in the source code:

            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
            <HTML><HEAD>
            <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
            <BODY></BODY></HTML>

            I suppose that there’s a option which allows webusers to edit their profile. But: Actually I don’t use any user roles for web and management users.

            I hope somebody can help me out.

            Thanks in advance!
              *there are no strangers - just friends who never met*
              • 5253
              • 17 Posts
              no solution for this problem?

              hm...can anybody recommend another snippet for profile editing?
              I’ve downloaded WebloginPE but this snippet required PHP 5 and ppp creates a new table and a separate user management. So this is not the best solution... sad

              thanks for helping


                *there are no strangers - just friends who never met*
                • 14430
                • 1 Posts
                Hi,

                I’m new to these forums, but have used ModX a couple of times already and am a big fan. I really needed to be able to edit the username as well as the other information for a profile. While YankeeDeuce’s mod is helpful, it obviously only works for fields in the same table. Here’s what I came up with. Keep in mind that I’m a major newbie when it comes to PHP or any server-side scripting. Maybe the more experienced members could come up with a much cleaner way of doing this...

                In webeditprofile.inc.php

                Line 11 - 12
                $result = $modx->db->select("*",$modx->getFullTableName('web_user_attributes'),"internalKey = ".$uid);
                $userdata = $modx->db->getRow($result);


                Add After
                $newresult = $modx->db->select("*",$modx->getFullTableName('web_users'),"id = ".$uid);
                $usernamedata = $modx->db->getRow($newresult);


                Line 25
                  $tpl = str_replace("[+username+]",$_SESSION['webShortname'],$tpl);


                Add After
                  $tpl = str_replace("[+username_edit+]",$usernamedata['username'],$tpl);


                Line 78
                  $fullname = $_POST['fullname'];


                Add Before
                $username_edit = $_POST['username_edit'];


                Line 84
                  $fields = array("fullname"=>$modx->db->escape($fullname),


                Add Before
                  $usernamefields = array("username"=>$modx->db->escape($username_edit));


                Lines 97 - 101
                  $rs1 = $modx->db->update($fields,$modx->getFullTableName('web_user_attributes'),"internalKey = ".$uid);
                  if(!$rs1) {
                      $output = webLoginAlert("Unable to update profile at this time!").$tpl;
                      return;
                  }


                Add After
                  $rs = $modx->db->update($usernamefields,$modx->getFullTableName('web_users'),"id = ".$uid);
                  if(!$rs) {
                      $output = webLoginAlert("Unable to update profile at this time!").$tpl;
                      return;
                    }


                And don’t forget to add the input field to the table
                <tr>
                <td>Username:</td>
                <td>
                <input type="text" name="username_edit" class="inputBox" style="width:300px" size="20" maxlength="100" value="[+username_edit+]"></td>
                </tr>
                <tr>


                I apologize for the messy code. I would love it if one of the experienced coders here added this functionality to this snippet. Feel free to do whatever you want with this, but don’t ask me for help. I’m happy that it works, but I don’t entirely know why it does. (Note: the line numbers are from the original code. I didn’t increment them as I added code to the file).

                Here’s the file that I’m using.
                  • 3143
                  • 46 Posts
                  Hi , thanks for this snippet.

                  I need a form to change only the state and the zip of the user, so i remove the html parts that don’t interest me but when submiting it removes the content of the mail field too.

                  Can someone please help ?

                  EDIT : any idea how to edit webloginPE’s profile ?