+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / extend change role in user.aspx

extend change role in user.aspx

4 posts, 0 answered
  1. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    18 Jun 2010
    Link to this post
    hi

    i want to extent the change role functionality in the admin user.aspx

    i know this has to be done with manageuser but cant fine how.


    how can i do it.

    thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Jun 2010
    Link to this post
    Hello vinamra,

    Could you elaborate what exactly should be changed? The Users.ascx has two main controls inside it - ManageUsers and inside it there is ManageProfile control. Generally modifying ManageUsers or ManageProfile controls means that you should inherit from one of these classes and implement your logic. Then the default controls should be replaced with the custom one in Users.ascx

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    21 Jun 2010
    Link to this post
    hi
    on role changing i want to run custom code (add some entries in the db according to the changed role)

    how can i do this

    thanks
    vinamra
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Jun 2010
    Link to this post
    Hello vinamra,

    The easiest way is subscribing for UpdatedUser event of ManageUsers control inside OnInit of Sitefinity\Admin\CmsAdmin\Users.aspx.cs. Then from ManageUsers.EditContainer you could access the controls inside the container and check the selected role. You should compare this role with the previously selected value and if there are different execute your logic against the database.

    You could also use the UpdateingUser event which is called before UpdatedUser

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered