We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31441
    • 5 Posts
    I’m using the edit profile feature to allow users to change their password and update some of their attributes like phone number and email address. The form itself works and everything I provide gets updated. Here’s the problem: When the form is submitted, all information I didn’t include in the form gets erased from the database when the form is submitted. Here’s my question: How can I protect information I don’t want users to change/erase in the database? BTW, I am using "saveprofilesimple"
      • 31441
      • 5 Posts
      Seem to be answering my own questions a lot these days. wink Anyway found "a solution" Tested it and so far it works. For those looking for an answer to a similar question, here’s what I did:

      In webloginpe.class.php, line 874:

      $generalElementsArray = array(’fullname’,’email’,’phone’,’mobilephone’,’dob’,’gender’,’country’,’state’,’zip’,’fax’,’photo’,’comment’);

      I just removed fields I didn’t want users to change (in addition to removing fields from the update form itself). I just want to add that there are conditions on dob and photo but what I did didn’t involve those fields, so not sure if simply removing those fields will do the trick.
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Couldn’t you create your own Chunk containing your own custom form with whatever fields you want your users to edit, then reference the chunk using the "&profileTpl" parameter? It’s a bit scary to hack the core code...
          • 27442
          • 103 Posts
          That is definately the way to go. Just use a template that only contains the fields that you want the user to edit.