Archive
Monthly
Go
|
|
DNN Blog
Jun
22
Posted by:
Charles Nurse
6/22/2006
One of the biggest enhancements in 3.3/4.3 was the overhaul of the User Profile feature. In ealier Blogs I have described some of these changes. In this Blog, I will describe how you (the Portal Administrator) can manage your portal's Profile options. Manage Profile PropertiesIn previous versions of DotNetNuke, the available profile properties were defined in web.config, and were therefore the same for all portals in the same DotNetNuke installation. With 3.3/4.3 we have implemented a system whereby a Portal Administrator can define the fields he/she would like to be part of a user's profile. Not only can the default profile properties be edited, but new profile properties can be added. Profile properties can be managed from the User Accounts admin module.  Once you are in the User Accounts module, you can then access the "Manage Profile Properties" action. Accessing the action depends on the "skin/container" used on your site. In the default skin the action is available in two locations - in the Action Menu available by clicking the small down arrow in the top left of the module, or in the list of links (Action Buttons) on the left of the container footer.  You can select either link to go to the Manage Profile Properties screen.  Again, the actual display will depend on your skin, and which styles have been implemented for the row and alternating row of the Grid. Lets look at the options available in this view. - The first two columns allow you to "edit" or "delete" a profile property.
- The next two columns (the Up/Down arrows) allow you to change the Display Order of the properties.
- The last two columns allow you to set whether the property is required, and whether the property is visible to the user. In addition the check boxes at the top of these columns allow you to set/unset the whole column at once.
- The "Update" button at the bottom saves the changes you have made in this view. Note that changes you make to the display order and the required and visible columns are not saved unless you click this button. Also note that the Delete Action happens immediately (as long as you confirm in the pop-up dialog that you wish to proceed).
- The "Refresh" button clears all the changes you have made, since the last "Update".
Editing an Existing Profile PropertyIf you select one of the "Edit" arrows in the first column, you will be redirected to the Edit Profile Definition UI (see below).  This screen allows you to modify some of the attributes of the Profile Property. Note that the Property Name and Data Type cannot be changed. Two attributes (the View Order and Category) are required as indicated by the red arrow. Lets look at the atributes you can edit: - Property Category - used to group the properties in the Profile Editor.
- Length - this value controls the maximum length of the attribute, and is only valid for Text properties
- Default Value - this property is not actually implemented yet (so it deoesn't do anything)
- Validation Expression - You can provide a regular expression to validate the data against (only valid for Text data types). For instance [\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+ can be used to enfoce a valid email address (somename@somesite.something).
- Required - You can set whether the property is required.
- Visible - You can hide the property from the user. Unchecking this allows an administrator to edit/view information about a user that is hidden from the user.
- ViewOrder - While this is better managed from the Grid View (see above), you can set the ViewOrder of the property here.
Update, Cancel and Delete buttons at the bottom work as expected. Update saves any changes, Cancel allows you to return to the list without saving the changes, and Delete allows you to delete the current property. Adding a New PropertyAs with most modules in DotNetNuke, adding a new property is similar to editing an existing one. Select the "Add New Property" action, either in the Actions menu or in the footer of the Module. You will then get the same screen as above for editing, with the exceptions that the first two attributes are now "editable".  These two fields are both required, as indicated by the red arrow. The property name is used to identify the name of the property (and is required to be unique within a portal, and the DataType allows you to select the type of property. Note: the list of DataTypes available is extensible, but that is a topic for a future Blog. In order to localize the text for a newly added property, you must have the ability to access the localization resource file (Profile.ascx.resx), so you can add the appropriate localized text. We are working on a system to automate this.
41 comment(s) so far...
Re: Managing Profile Properties - A Tutorial for Administrators
Hi.
Sorry. English is not my first language.
When you configure the Data Type property to "List", how elements to the list are added?
By tatis on
6/23/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
When you use Data Type "List" it takes the values from the Host - Lists. There you need to create a new List (with the same name as the custom Profile property) and fill it with data. It would be even better if the Lists could be on a portal level since now you are dependend on the host user to create the list for you.
Also it should be noted that deleting one of the default properties should be avoided (you better just hide them) since they could be used in other locations of the framework (the Preferredlocale for instance).
By Geert on
6/23/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
I can't wait for you to explain the "Unknown" type :) Also, the "Page" type looks very interesting. Great work, we should see a lot of exciting implementations of this new functionality.
By AdefWebserver on
6/24/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Thanks Charles.
DNN is hot!!!
By tatis on
6/24/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Yeah - the Unknown Type should probably be deleted (its effectively a Text type anyway).
Quite late on in the dev cycle it was realised that the changes impacted two areas of the App (Lists and Languages) where only Hosts can currently update, and we are working on a solution to both of these now that admins are able to manage the profile properties.
By cnurse on
6/25/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
i want to use the new 4.3 registration form but i also need to keep my existing 4.02 registration look. http://www.otbradio.com/registration/tabid/53/Default.aspx
what's the best way to do this?
By afromobile on
6/26/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Can the Profiles be extended to support multiple values that change over time? For example, health/medical data?
Thx.
By jyjohnson on
6/27/2006
|
Display label for new fields on page?
How do we display the label for new fields? Great work - Thanks!
By wylieinc on
6/28/2006
|
Registration form
Hi,
I've modified the profile properties and added a field. When I add the User Account module to a page, it still shows the old fields. Or am I misunderstanding the purpose of "Manage Profile Properties"?
Thanks for any help, chris
By mombassa on
6/28/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
jyjohnson - short answer yes. Long answer - subject of another blog in the near future "Managing Profile Properties - Defining your own DataTypes"
By cnurse on
6/28/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
In dnn 3.3.1, the "user account module" still shows the "profile settings" in the old way, with all the old properties arranged in two columns.
Is there any module to display the new account screen with the four separated sections? How can I setup a module definition to show it?
I know that if you click on the skin "resigter" skin object you go to this screen, but I like to have a custom page for the profile, with some other modules.
By lodani on
6/29/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
lodani - I think your question is the same as mine. Charles posted a reply to my post:
Re: Improving Performance in 3.3/4.3 By cnurse on 6/28/2006 mombassa - I think the User Account Module is still configured to use the old registration control. Use Module Definitions and change the User Account to use
Admin/Users/ManageUsers.ascx
instead of
Admin/Security/Register.ascx
By mombassa on
6/29/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
mombassa - thanks, this shows now the new registration form.
Howerver I also need is to show the same "control" that is displayed when you click on "your-name-link" near the "logoff" link once you are logged in.
Any idea?
By lodani on
6/30/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
this is my question too. how to create a custom registration page but still use "Profile Properties"?
By afromobile on
6/30/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
I haven't gotten there yet but once I do I'll let you guys know =)
chris
By mombassa on
7/2/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
I would create a webcontrol that inherit HtmlInputFile, for allow user to upload their photo in profile.
I guess i must proceed Like this:
1) Create my webcontrol (similar at TextEditControl ? I must use reflection?)
2) In Lists, add new datatype "PhotoEdit" with name space of my new webcontrol (for example "MyApp.UI.WebControls.DNNPhotoEditControl, MyApp")
3)In "Manage Profile porperties" i can add a new property, for example UserPhoto and assign to it PhotoEdit datatype.
I am in right way? any suggestion?
Thanks in advance and sorry for my poor english.
By Sirioz10 on
7/3/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi! I am a new user of DNN 4.3.4. I'v created lists to be used with profile properties, but if I check a field as required, my users can do the register without any action because the fields appears filled. I think the list box should be empty (without any value), then I could force them to fill the profile. A doubt! Can the user name be the e-mail adress?
Thanks!
By rreal on
9/1/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Charles, have you thought about extending the properties structure to allow for properties that represent arrays? An example might be "Children", so that a user might add each of their sons and daughters. This would be useful with phone numbers, url's, etc... It would be a lot better than allowing for "phone1" , "phone2", etc.
Thanks for all of the work you have put into this; you're providing a lot of wealth to the community.
Matt
By mr17hz on
9/6/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Charles: One of the uses I have for Profile properties is to store the name of the project that my users have selected within my DNN app. They can choose to work on one of multiple projects that they have set up. When they pick it, I persist it to a profile property and then I can reference it in code when I need it. Before I was just saying x = Profile.;
1. What is the way of doing this now in the new model. I have not seen an example of how to reference a profile property in code.
Thanks Harold
By hchattaway on
9/8/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
How do you setup Email smtp settings for server to handle email messages being sent to users from site. I cant get host password sent to email address. It says it was sent, but I never receive it. I didi not set host email at first. I went to database for application and opened user file and added email address.
By rshevlin on
10/1/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Charles
Do you know how you can add a photo to a user profile?
Thanks Koen
By helpdeskBIT on
10/3/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
When I try to add Profile Properties to the SuperUser account they are never added to the grid. For some reason they don't want to save to the Super user account, but works for the User Accounts.
Any ideas?
By Kampfer on
10/12/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
helpdeskBIT,
To add a photo to the user profile I just stored the images url in a profile property.
By Kampfer on
10/12/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi Charles, I am having problems with this. I added a profile property. I am not able to delete the new property. Also, now the drop down boxes for the country, region, timezone, and local are not working. Any ideas on how I can delete the new property? The links don't work. Any ideas on why the drop downs aren't working?
Thanks, Paula
By SweetPs on
10/25/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Okay, I stupidly deleted two of the default fields, Street and Unit. I have some apps that need these two fields. How do I put them back to their orginal state??
By YodaRocks on
11/19/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
I tried to figure out in which of the table the information is stored for the profile property. Can anyone help out?
By vracicot on
11/20/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
How to access user-defined property in code? It seems ProfilePropertyDefinitionCollection is 0 when i tried to access it.
By wvgen on
11/29/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
Charles,
Great work! A question and a suggestion.
Question: Do Profile Properties migrate to new portals if a portal template is made from a portal with extended Profile Properties?
Suggestion: Could we get a Multi-Select Type, and a Lookup-Type? The Lists is quite useful but only for single property selection (multi-select would acommodate this).
A lookup type might simply ask for a table and field in a portal. For instance "Manager" might be a lookup to the Users table, FullName Field for that Portal. I am aware this might create some security logic issues. However, it would certainly improve the Data Integrity of extended Profile Properties, while creating a global repository of cross-referenceable User Settings.
One method (albeit a huge task) is used by the DMX (Peter Donker) has CRUD (Create Read Update Delete) Role Lists in a Meta-Data Table. This type of meta-data for security on tables could be an entire topic area, frankly.
By schafer_brad on
12/13/2006
|
Re: Managing Profile Properties - A Tutorial for Administrators
I'd like a new datatype that can retrieve data from one or more tables in the database. Charles says "Note: the list of DataTypes available is extensible, but that is a topic for a future Blog.". Is there a new blog entry on this or has anyone successfully done something similar.
thx
By badri on
2/20/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Charles,
When will you tell about extending the Profile Properties?
Also, are you the one to fix the profile issue for DNN-3736?
There are a lot of users that would like to be able to use DATE fields in the custom profile.
Here is the text from that issue:
"Adding fields to the User Profile is easy now, but there is no support for the Date/Time data type (to store birthdates for example) or support for the SQL Image type (to store a photo of the user)."
By ps30 on
2/23/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
add me to the list of people that needs the following: 1. more info on extending the Profile Properties 2. need an image and datetime datatype
thanks
By 1019 on
2/26/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi Charles
Please can you advise on how I can sort the following out...
Logged in as HOST, added a Profile Property [Industry - defined it as a text field, Made it a required field, entered "text" for the validation expression [instead of inserting a regular expression validator -3.30am in the morning!!] and "-- enter your indutry type --" for default text.
I updated the Member Profile Settings; logged out and attempted to log back in as HOST and was redirected to the Update Your Profile Screen where on attempting to enter ANY text in the new INDUSTRY form field I was presented with a validator message saying NOT A VALID INDUSTRY TYPE!!
So....can someone less clueless than me please kindly tell me how I can get rid of this member profile field so I can get back my host level permissions to login to the website on the server?!
not a developer as you can tell...
THNKS MikeT
By miket on
7/21/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
I think I have a bug in 4.5.4 in the Admin » User Accounts » Manage Profile Properties » Add New Profile Property » Edit Profile Property Definition page. The Data Type does not show a combobox and does not allow anything to be set. It just says "AD" in a label.
Is there anyway to fix this to get the combobox back?
By toddmain on
7/22/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Is it possible to link a group list with css data using this method? I'm aiming for custom skins for groups on my site.
By phils on
11/6/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi Charles, simple question: how can I customize the length of the property fields?For instance I want the last name to show more than 20 characters.Can this be done?
By dionisof on
11/29/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Lots of questions left unanswered here at the end. Date Edit Controls were added in the 4.5.2 version. see here ( http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1436/Default.aspx ). We're still waiting on a "photo control". And this blog: "The list of DataTypes available is extensible, but that is a topic for a future Blog"
By BentAngle on
12/23/2007
|
Re: Managing Profile Properties - A Tutorial for Administrators
Take a look at this
http://www.dnndevzone.com/Library/tabid/126/ArticleId/4/Default.aspx
hats off to Charles I'd say!
By jab on
1/25/2008
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi Charles,
You say "# Default Value - this property is not actually implemented yet (so it deoesn't do anything)" Well, I've preset Country property to "Spain" and it actually works: I get Spain in Country property and dropdown Region shows spanish regions (which I've preciously entered at Lists). The funny thing is that I change the value in countries list from Spain to anything else and then Default Value doesn't work anymore. Does anyone knows why?
By perezandres on
6/12/2008
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hello, Charles. I am able to successfully create a profile property and I can see that it is added to the database. I can also add the profile property to a user's profile and see in on the database, but when I try to retrieve the profile property for the user, the profile property is not retrieved. I also can't see the new profile propery in the "Manage Profile" screen for the user. I CAN see the property definition on the "Manage Profile Properties" screen.
Code that I use to create the property for the current user.
Dim profDef As ProfilePropertyDefinition = ProfileController.GetPropertyDefinitionByName(PortalId, "Client") profDef.PropertyValue = profDef.DefaultValue UserInfo.Profile.ProfileProperties.Add(profDef) ProfileController.UpdateUserProfile(UserInfo, UserInfo.Profile.ProfileProperties)
Code that I use to try and retrieve the current user's profile. UserInfo.Profile.ProfileProperties.GetByName("Client")
I have also tried debugging to see if the property is in the UserInfo.Profile and it is not. Can you please offer suggestions?
By jjcastillo on
9/11/2008
|
Re: Managing Profile Properties - A Tutorial for Administrators
i m new to dotnetnuke. i want to add radio buttons(grouping) to a profile property. plz anyone help in this.....
By abdul on
3/25/2009
|
Re: Managing Profile Properties - A Tutorial for Administrators
Hi all,
Sorry to jump in like this. Is anybody familiar with creating profile accounts? Like a profile with picture and person's details, likes, dislikes etc.
By Daniel on
7/13/2010
|
|