Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Junior 5 posts 76 karma points
    Jun 30, 2017 @ 21:33
    Junior
    0

    Saving a Password Custom Property from UI to back office

    I was wondering is someone can help me pinpoint an issue I am having. I have a custom property for a password in the back office. We have this property on a "update profile" page on the front end. The property on the front end renders the value correct from the back office. When the user changes the password then it saves correctly but the value for the property in the back office is blank.

  • Alex Skrypnyk 3636 posts 12380 karma points mvp
    Jul 13, 2017 @ 21:26
    Alex Skrypnyk
    0

    Hi Junior

    Can you show the screen of the back office property?

    Why are you using a custom property for the password?

    Thanks,

    Alex

  • Alex Skrypnyk 3636 posts 12380 karma points mvp
    Jul 17, 2017 @ 09:35
    Alex Skrypnyk
    0

    Hi Junior

    Did you find a solution? Share please with our community.

    Alex

  • Junior 5 posts 76 karma points
    Jul 24, 2017 @ 12:50
    Junior
    0

    My apologies for the delay. I was able to figure it out. We are integrating a piece of our company software using a macro on an intranet site we are working on. I used a custom property on an employees profile for username and password for the macro and not the Umbraco profile. The password and username needed to be editable by the user if they recently changed their password for that software but we did not want it to show on the front-end or the back office.

    I had this in the view:

    <div class="form-group">
        @Html.LabelFor(m => m.integrationPassword, new { @class = "control-label" })
        @Html.PasswordFor(m => m.integrationPassword, new { value = Model.integrationPassword, @class = "form-control" } )
        @Html.ValidationMessageFor(m => m.integrationPassword)
    </div>
    

    For the model I had:

    model.integrationPassword= member.Properties[Employee.GetModelPropertyType(p => p.integrationPassword).PropertyTypeAlias]?.Value?.ToString() ?? string.Empty;
    

    And on Save I had this:

    member.Properties[Employee.GetModelPropertyType(p => p.integrationPassword).PropertyTypeAlias].Value = model?.integrationPassword?.ToString() ?? string.Empty;
    
  • Alex Skrypnyk 3636 posts 12380 karma points mvp
    Jul 24, 2017 @ 17:12
    Alex Skrypnyk
    0

    Hi Junior

    Is it working for you? What is the problem?

Please Sign in or register to post replies

Write your reply to:

Draft