More in this section

Forums / Bugs & Issues / Unable to modify user with code

Unable to modify user with code

2 posts, 0 answered
  1. Gaurav
    Gaurav avatar
    38 posts
    Registered:
    30 Nov 2010
    07 Feb 2011
    Link to this post
    protected void btnSaveUser_Click(object sender, EventArgs e)
       {
           try
           {
               Telerik.Sitefinity.Security.UserManager um = new Telerik.Sitefinity.Security.UserManager();
               Telerik.Sitefinity.Security.Model.User user = um.GetUser(DropDownList2.SelectedItem.Text);
               user.FirstName = RadTextBox2.Text;
               user.LastName = RadTextBox3.Text;
               um.SaveChanges();
           }
           catch (Exception ex)
           {
           }
       }
    Hi there
    I am unable to modify the user name by above code . as i have created user with the Create user wizard of ASP.net control . But it take only User Name , Password and email while creating the user . I want to assign the First Name,Last Name with Above code but it is not working . Can you please suggest me How to Change the user information with code
    Thanks
    Gaurav
  2. Gaurav
    Gaurav avatar
    38 posts
    Registered:
    30 Nov 2010
    07 Feb 2011
    Link to this post
    Its working there was fault in my Code on page Load
2 posts, 0 answered