We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38357
    • 178 Posts
    Hello,
    Using Revolution 2.2.1
    I am trying to give logged on users access to their profile page so that they can make changes from the front-end.
    Using the Login package I have created the User Profile resource following the instructions at http://rtfm.modx.com/display/ADDON/Login.UpdateProfile
    I have also given the users change_profile permission under their access policy.
    The Change Profile Page appears correctly, additions can be made but they are not saved when the Update Profile button is clicked - even if I am logged on as administrator with superuser permissions.

    I have the Change Password option on the same page, but that doesn't update either.

    Any help appreciated

    Thanks [ed. note: bobd72 last edited this post 12 years ago.]
      • 38357
      • 178 Posts
      Perhaps no-one else is using this facility? The resource renders correctly and shows the exiting user profile details but won't change them.

      Any suggestions please?

      Code I have used is below:
      <p>[[!UpdateProfile]]</p>
      <div class="update-profile">
      <div class="updprof-error">[[+error.message]]</div>
      [[+login.update_success:if=`[[+login.update_success]]`:is=`1`:then=`[[%login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]<form class="form" action="[[~[[*id]]]]" method="post"><input type="hidden" name="nospam:blank" value="" /> <label for="fullname">[[!%login.fullname? &namespace=`login` &topic=`updateprofile`]] <span class="error">[[+error.fullname]]</span>    </label><input id="fullname" type="text" name="fullname" value="[[+fullname]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="email">[[!%login.email]] <span class="error">[[+error.email]]</span>          </label><input id="email" type="text" name="email:required:email" value="[[+email]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="phone">[[!%login.phone]] <span class="error">[[+error.phone]]</span>         </label><input id="phone" type="text" name="phone" value="[[+phone]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="mobilephone">[[!%login.mobilephone]] <span class="error">[[+error.mobilephone]]          </span></label><input id="mobilephone" type="text" name="mobilephone" value="[[+mobilephone]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="fax">[[!%login.fax]] <span class="error">[[+error.fax]]</span>             </label><input id="fax" type="text" name="fax" value="[[+fax]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="address">[[!%login.address]] <span class="error">[[+error.address]]     </span>  </label><input id="address" type="text" name="address" value="[[+address]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="country">[[!%login.country]] <span class="error">[[+error.country]] </span>      </label><input id="country" type="text" name="country" value="[[+country]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="city">[[!%login.city]] <span class="error">[[+error.city]]</span>             </label><input id="city" type="text" name="city" value="[[+city]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="state">[[!%login.state]] <span class="error">[[+error.state]]</span>           </label><input id="state" type="text" name="state" value="[[+state]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="zip">[[!%login.zip]] <span class="error">[[+error.zip]]</span>     </label><input id="zip" type="text" name="zip" value="[[+zip]]" /></form><form class="form" action="[[~[[*id]]]]" method="post"><label for="website">[[!%login.website]] <span class="error">[[+error.website]]</span>       </label><input id="website" type="text" name="website" value="[[+website]]" /></form><form class="form" action="[[~[[*id]]]]" method="post">
      <div class="form-buttons"><input type="submit" name="login-updprof-btn" value="[[!%login.update_profile]]" /></div>
      </form></div>
      <h2><span style="color: #6a9d19;">Change Password </span></h2>
      <p>[[!ChangePassword? &submitVar=`change-password` &placeholderPrefix=`cp.` &validateOldPassword=`1` &validate=`nospam:blank` ]]</p>
      <div class="updprof-error">[[!+cp.error_message]]</div>
      <form class="form" action="[[~[[*id]]]]" method="post"><input type="hidden" name="nospam" value="" />
      <div class="ff"><label for="password_old">Old Password <span class="error">[[!+cp.error.password_old]]</span>              </label><input id="password_old" type="password" name="password_old" value="[[+cp.password_old]]" /></div>
      <div class="ff"><label for="password_new">New Password <span class="error">[[!+cp.error.password_new]]</span>             </label><input id="password_new" type="password" name="password_new" value="[[+cp.password_new]]" /></div>
      <div class="ff"><label for="password_new_confirm">Confirm New Password <span class="error">[[!+cp.error.password_new_confirm]]</span> </label> <input id="password_new_confirm" type="password" name="password_new_confirm" value="[[+cp.password_new_confirm]]" /></div>
      <div class="ff"><input type="submit" name="change-password" value="Change Password" /></div>
      </form>
      
        • 38357
        • 178 Posts
        Very frustrating. No solutions.
        Some additional information:
        When logged on as admin in the back-end I can change my user profile. However, if I log on as admin in the front-end I am unable to change my profile from the form generated by the above code.

        If no-one is successfully using this feature of Login, am I to assume that this is a bug? I have followed the manual processes correctly I think.
        • Did you give the user admin privileges to the web context? when using Login permissions differ from the manager to the web context they are different.

          So make sure you give the user the permissions you want in the correct context, it is most definitely a permission issue.

          Good luck,
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 38357
            • 178 Posts
            Thanks for your response benmarte,
            Yes - I believe it is a permissions issue but I can seem to resolve it.

            I have given the user group admin permissions in the Web Context and resource permission (with the addition of change_password and change_profile) for Resource Group Access. I thoguht this would be sufficient, but it doesn work. Even giving admin permission for Resource Group Access as well fails.

            I donẗ think I have to give any special Elements permissions in this instance?

            Any suggestions as to how to resolve this would be greatly appreciated. I have read extensively but can seem to find a solution :-(
              • 38357
              • 178 Posts
              As it turns out it was not a permissions issue. Just thought I would relate my experience to perhaps help others with a similar problem.

              Using the code at http://rtfm.modx.com/display/ADDON/Login.UpdateProfile I was unable to get this to work at all. Total frustration and failure :-( If there is a problem with this code (but perhaps it's just me) it really needs reviewing.

              I finally found an excellent tutorial at http://forums.modx.com/attachment/download?file=7393 the code for UpdateProfile given here is very similar (it uses
              [[!UpdateProfile? ]]
              instead of
              [[!UpdateProfile]]


              I also found this discussion useful: http://forums.modx.com/thread/?thread=53480.&i=1&page=1

              Hope this helps someone else [ed. note: bobd72 last edited this post 12 years ago.]