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

Forums / Developing with Sitefinity / Extend user search fields on Admin user Administration page.

Extend user search fields on Admin user Administration page.

6 posts, 0 answered
  1. Ana
    Ana avatar
    8 posts
    Registered:
    24 Aug 2010
    24 Aug 2010
    Link to this post
    Hi there,
    I added some custom fields to user profiles (Last Name, First Name, Phone Number.. etc).
    By default on user manage page I am able to find users only by Username and email.
    Is there any way to include my custom fields as a search options into "search users by" dropdown and perform search by custom fields?

    Regards,
    Anastasia
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Aug 2010
    Link to this post
    Hello Ana,

    Membership class exposes the following methods that allow you to find a user.

    Public methodStatic member FindUsersByEmail(String) Gets a collection of membership users where the e-mail address contains the specified e-mail address to match.
    Public methodStatic member FindUsersByEmail(String, Int32, Int32, Int32) Gets a collection of membership users, in a page of data, where the e-mail address contains the specified e-mail address to match.
    Public methodStatic member FindUsersByName(String) Gets a collection of membership users where the user name contains the specified user name to match.
    Public methodStatic member FindUsersByName(String, Int32, Int32, Int32) Gets a collection of membership users, in a page of data, where the user name contains the specified user name to match.

    We use the same methods when you perform a search. There is no API methods that allows you to search the users by other parameters.

    Custom properties - Last Name, First Name, Phone Number etc are manager by ProfileBase class. You can create a custom search control that retrieves users' data base on these properties using ProfileBase class methods. This means that you should have a custom GridView or RadGrid control that will replace the default one.

    Kind regards,
    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. Ana
    Ana avatar
    8 posts
    Registered:
    24 Aug 2010
    25 Aug 2010
    Link to this post
    Thank you for you fast response.
    If I am going to use custom gridview to display list of users how to fire all standard events and populate all links in a proper way? For example the is a delete button and link to profile on every row.


    Regards,
    Ana


  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Aug 2010
    Link to this post
    Hello Ana,

    You cannot extend the current control, because there are many methods that cannot be overridden and this control is wrapped in another control - ManageUsers which also has its own events and logic which cannot be easily replicated. The easiest way would be to create a new control and hide the default one.
    You can use ASP.NET GridView  or RadGrid control and methods of MembershipUser, Membership, MembershipUserCollection, ProfileBase classes.

    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
  5. Ana
    Ana avatar
    8 posts
    Registered:
    24 Aug 2010
    25 Aug 2010
    Link to this post
    So I need links to user profiles in my custom GridView as you do have in a default GridView. What url to user profile should look like? Or should I create my own page to display user profile?

    Regards,
    Anastasia
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Aug 2010
    Link to this post
    Hello Ana,

    The "profile" link hides one of the modes of ManageUsers control where the RadGrid is wrapped. There is no additional page. This is the same control - ManageUsers, but another holder is shown. The holder that shows wraps ManageProfile control.

    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
6 posts, 0 answered