Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to make changes to USER ACCOUNT page - sorting, adding new fieldsHow to make changes to USER ACCOUNT page - sorting, adding new fields
Previous
 
Next
New Post
2/23/2009 11:34 AM
 

Hi,

I want to add a new text field on the User registration page. I know how to do that. But there are few things that I am not able to figure out:

- I want to display this new field in the USER ACCOUNTS page (admin menu -> User Accounts) along with other displayed fields like Username, Name, Address, Telephone, Created Date, Authorize.

- I want to remove Address from the USER ACCOUNT page list.

- And I want to sort the USER ACCOUNTS by CREATED DATE instead of the NAME.

I am using DNN 4.8.4 with SQL Server 2005. I am fairly new to DNN. I tried making changes to the controls on page ../Website/admin/Users/user.ascx but either the page throw error or doesn't display that control at all, I guess, because this page inherits controls from DotNetNuke.Modules.Admin.Users.UserAccounts. In this case is it possible to make changes to the controls? If yes, then how? I also tried making some changes to the codefile Users.ascx.vb

Private Sub BindData(ByVal SearchText As String, ByVal SearchField As String)

....

'grdUsers.DataSource = Users

and in GetUsers stored procedure sorted data by Created Date, but it didn't worked.

Any help will be really appreciated.

 

Thank you very much in advance.

Divya

divya@hea.biz

grdUsers.DataSource = UserController.GetUsers(PortalId, False)

grdUsers.DataBind()

 
New Post
2/23/2009 12:40 PM
 

diva wrote
 

Hi,

I want to add a new text field on the User registration page. I know how to do that. But there are few things that I am not able to figure out:

- I want to display this new field in the USER ACCOUNTS page (admin menu -> User Accounts) along with other displayed fields like Username, Name, Address, Telephone, Created Date, Authorize.

- I want to remove Address from the USER ACCOUNT page list.

- And I want to sort the USER ACCOUNTS by CREATED DATE instead of the NAME.

I am using DNN 4.8.4 with SQL Server 2005. I am fairly new to DNN. I tried making changes to the controls on page ../Website/admin/Users/user.ascx but either the page throw error or doesn't display that control at all, I guess, because this page inherits controls from DotNetNuke.Modules.Admin.Users.UserAccounts. In this case is it possible to make changes to the controls? If yes, then how? I also tried making some changes to the codefile Users.ascx.vb

.......

Any help will be really appreciated.  Thank you very much in advance.

Divya

Answering some of your questions...

Adding profile fields to USER ACCOUNT screen:
The first rule of customizing DNN:  You typically do NOT want to alter the "core" DNN code.  If you do, you may not be able to upgrade to new versions of DNN without losing your changes.

Instead, use a third-party module or write your own module for the job.  If you only need a way to search and sort user accounts you can do this with the User-Defined Table (UDT) module or the REPORT module.  If you want to heavily customize the user registration process then it's probably worth your time to simply go for the DynamicRegistration module from DataSprings.
 

- I want to remove Address from the USER ACCOUNT page list.
This is built-in.  Go to ADMIN->USER ACCOUNTS->USER SETTINGS and look under "User Accounts Settings".  Uncheck the "Show Address Column".
 
 
- And I want to sort the USER ACCOUNTS by CREATED DATE instead of the NAME.
 Again, back to the "third-party module" or create your own.  Here's a simple sample of showing how to list the "most -recent 10 user accounts" -- i.e., sorting accounts by CREATED DATE.
 
   http://www.eguanasolutions.com/DNN_Blog/EntryID/2.aspx
 
 
Hope this is of some help-
-mamlin


esmamlin atxgeek.me
 
New Post
2/23/2009 2:17 PM
 

Thank you very much mamlin. I really appreciate your quick response. I understand your concern about the code being overwritten on upgrade, thank you for the suggestion.

I have tested all of the solutions you have mentioned above. They all are really very helpful in one way or another and will reduce lot of work in my upcomming projects too. REPORT MODULE and http://www.eguanasolutions.com/DNN_Blog/EntryID/2.aspx seems to be doing exactly what I want. But I am curious, as I read somewhere (can't find the link right now) that the second solution (Advanced datagrid) also allow editing within the grid. Is it possible? If yes, then it will solve whole issue.

 

Thank you very much for help. It really saved me lot of future efforts.
Divya

 
New Post
8/17/2014 1:02 PM
 

Very formal answer (not to overwrite code), but....
doing a quick and dirty "hack" takes < 30 seconds, whereas buying a 3rd party module cost $$$. In my own world as a software architect at a large global company, that answer would not have been acceptable for me. 

DNN, please make changes to the the user accounts grid so that we can specify a sort order.

Meantime, for the person that asked the original question, you do it in PROCEDURE [dbo].[GetAllUsers]

WITH [tmpUsers] AS ( SELECT U.*, row_number() over (order by U.XXXXXXXXXXXXXXX) AS rowid FROM dbo.vw_Users u

Why the developers handle paging in the TSQL (this partitioning they do in SQL with the "OVER" clause, when the telerik grid is very capable of handling the paging, is strange to me) (see xxxxxxx above, and change that to your field, I use DisplayName as sort order, and my display name is set to [Lastname], [FirstName] (because in non developers world, one search by a persons surname and name, and not a strange looking username)

Here is another tip for handling YOUR hacks in DNN source code:

I hack a lot of DNN stuff (SQL, cs, css, ascx etc, and the add a comment with my name in -- JOE SOAP  or //JOE SOAP + the reason I did it. Then before I apply a DNN patch, I make a copy of the web and the SQL (Copy Database). After an update I use a file compare utility and db compare utility, filter on all that contains my name "JOE SOAP" and re-apply my hacks. (pew, still better than re-writing DNN or buying 3rd partyt modules for almost everything.

With this "compare" after every update, you also force yourself to know exactly what changes was made in DNN.

Good luck!

 

 
New Post
8/17/2014 2:10 PM
 
Guss,
you are correct, that paging might be done either in the database or in cod behind the UI. In the second case, all data is queried from the database and cached on the server. If you consider dnnsoftware.com with more than 500.000 registered user, this is not very efficient - therefore it is preferable to query just the data to be displayed .

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to make changes to USER ACCOUNT page - sorting, adding new fieldsHow to make changes to USER ACCOUNT page - sorting, adding new fields


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out