Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    Aug 02, 2019 @ 08:02
    Anton
    0

    Cannot change member Username by code

    I tried such code, email and name changed, but Username don`t, What I do wrong? maybe some configuration settings

    var member = ApplicationContext.Services.MemberService.GetByUsername(Request["profileModel.UserName"]);
                member.Username = Request["profileModel.Email"];
                member.Email = Request["profileModel.Email"];
                member.Name = Request["profileModel.Name"];
                ApplicationContext.Services.MemberService.Save(member, false);
    
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Aug 04, 2019 @ 12:26
    Alex Skrypnyk
    100

    Hello Anton

    Can you check what is your setting in UmbracoSettings.config file => security section => usernameIsEmail field?

     <security>
        <!-- by default this is true and if not specified in config will be true. set to false to always show a separate username field in the back office user editor -->
        <usernameIsEmail>false</usernameIsEmail>
      </security>
    

    Thanks,

    Alex

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Aug 08, 2019 @ 11:43
    Alex Skrypnyk
    0

    Hello Anton

    Let me know how things are going? Did you solve the issue?

    Thanks, Alex

Please Sign in or register to post replies

Write your reply to:

Draft