Registration Tutorial
Last Post 10/23/2008 8:49 AM by aa. 18 Replies.
Author Messages
Mike Cox
Nuker
Nuker
Posts:14


--
09/06/2006 11:39 AM
    I liked your registration tutorial.  It was very good and full of great ides that I would have never considered.  Once someone has registered, is there any way to get a report of the registration.  Right now you can go into users adn edit the profiles but if I will need to print off registrations. 

    Can the registration details be emailed, if so that may be good enough.

    Mike
    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    09/06/2006 4:56 PM
    Glad you found the tutorial useful. - When a user registers you should receive an email notification, it is sent to the administrators email address - Make sure that the email facilities are set up in your DNN installation for this to work. - Check the Host / settings / smtp

    Having said this, I don't know if the registration will email across the full details that are specified in a custom registration form.

    You can check the emails that are sent out by going to:

    Host Menu / Language Editor / and scroll down

    Otherwise, it may require some core code modifications to get the features you require.

    If you have access to your SQL database via Enterprise Manager, then you could also potentially create an SQL query to extract the data you require and then save it into an excel file.
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    Mark Schuler
    Nuker
    Nuker
    Posts:15


    --
    09/11/2006 12:48 PM
    mcox

    Did you find a solution to your issue? I have a similar need to get the details of the registration.


    Lee
    I am creating a site where a person can register for a product, or just register for updates to products. There are different required fields for each type of registration. Is there a way to have more than one registration profile to handle this scenario?

    Thanks Lee. I think I just struck the jackpot with these Registration videos. They more than paid for the subscription.
    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    09/11/2006 3:28 PM
    If you wish to create different registration profiles, the only way I can think of doing this is to create several portals within your DNN installation.

    Each portal can be setup with a different registration form.

    The other option would be to just have several tick boxes on your one registration form asking the user to tick what information they are interested in.

    Thanks,
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    Mike Cox
    Nuker
    Nuker
    Posts:14


    --
    10/25/2006 2:58 PM
    One thing that I did find is when you go into Security Roles and then click on the security role to view all tthe registered users, you can click on each user and get a report f their registration.  If you used a  container with the Print function enabled, that report may print out relatiively decent.
    Mark Schuler
    Nuker
    Nuker
    Posts:15


    --
    10/26/2006 11:18 PM
    Lee

    Is it necessary to have both a Username and a Display name in the registration? If you remove the Display name will it display the Username as a display Name? If you can remove DisplayName, how do you do it?

    Thanks.

    Mark
    Mark Schuler
    Nuker
    Nuker
    Posts:15


    --
    10/26/2006 11:24 PM
    Lee

    Do you see any problems with using a custom registration page with only a few required fields. Then writing my own registration page where I have additional required fields. I would read the existing data out of the database to populate my own registration page, then when the user submits, I would write all the data back into the database.

    I'm doing this because all the user profile data I need is already there for them to register for products. I need mailing address,etc, but I'd like them to just be able to register with a Username/Password/email to get a newsletter and update notices to the site. Does this sound like a reasonable approach or is there a better way?

    Thanks Lee.
    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    10/27/2006 6:54 AM
    Hello,

    From a quick look, it appears as though you can't remove display name. - Display name is now used for the name that is displayed next to the login / logout link.

    I don't know why they have done it this way, seems a bit overkill to me.

    With a custom registration page, you shouldn't have any problems, but I have not attempted it so can't really provide a lot of advice. - What I would say is check out the actual register module and see how that interacts with the new version of DNN (This module still uses the old layout of the registration form). It maybe worth just creating a completely new registration module and customizing it to your needs.

    There are a few posts on here regarding custom registration forms, so i would have a read through those as well. (for pre DNN4.3.x)

    Let us know how you get on,

    Thanks,
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    Mark Schuler
    Nuker
    Nuker
    Posts:15


    --
    10/28/2006 3:52 PM

    Lee

    I had another idea on how to create two different registration pages.  What if I just made a copy of the ../Admin/security/register.ascx page and modified the Validator fields?  I know somewhere the fields require validation based upon whether the "required field" checkbox is checked.  Would this be easy to override and just have static validators for each field?

    Thanks Lee.

    Mark Schuler
    Nuker
    Nuker
    Posts:15


    --
    10/30/2006 3:33 PM
    In case anyone else wants to create a quick & easy custom registration page, here's what I did and it seems to work very well.

    I created a new ascx module with labels, texboxes, and dropdownlists, to hold all of the users profile data that and credential data (firstname/lastname/email/displayname) that I want the user to enter. Then I filled in the fields with existing profile data like this:
    ...
    txtCity.Text = UserInfo.Profile.GetPropertyValue("City")
    ...
    If the user hasn't already given this information, it will just appear as a blank textbox.

    Finally, I put a "Register" button with the code to write these values to the UserInfo object, like this:
    ...
    UserInfo.Profile.SetProfileProperty("City", txtCity.Text)
    ...

    Followed by this line which writes everything back to the database
    UserController.UpdateUser(PortalId, UserInfo)

    I still need to Validate the user input before I enter it, but that's not the topic here.

    That's basically it. I had one problem - the credential name was not the same as the Profile Name - and I solved that by writing back to both, like this:

    UserInfo.Profile.SetProfileProperty("FirstName", txtFirstName.Text) ' Writes to "UserProfile" table
    UserInfo.FirstName = txtFirstName.Text ' Writes to "Users" table


    One
    Lee Sykes
    DNN Creative Staff
    Nuke Master VI
    Nuke Master VI
    Posts:4945


    --
    10/31/2006 3:44 AM
    Hello,

    Thanks for posting the info,
    Lee Sykes
    Site Administrator
    Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

    Twitter: www.twitter.com/DNNCreative

    Lee Sykes's Facebook Profile
    John
    Nuke Newbie
    Nuke Newbie
    Posts:3


    --
    03/07/2008 8:45 AM
    I also liked the registration tutorial.

    I have been putting regular expressions in the property validations window (eg to ensure that only post codes of a valid format are submitted) and this works fine.

    However, I have not been able to find a way to make regexp work on First Name or Last Name by amending the FirstName and LastName properties.
    First Name and LastName have the Required and Visible check boxes unchecked as recommended in the tutorial (ie to remove the second instances of First Name and Last Name from the customised registration form)

    Any ideas?

    Thanks

    John Pollard
    Aleem
    Nuke Newbie
    Nuke Newbie
    Posts:2


    --
    05/01/2008 9:28 AM

    Hi there,
    I am trying to update property in User Profile. For example i created a new property "CompanyName". How can i update/insert value for "CompanyName"
    I am following "One" advise from the above post

    UserInfo.Profile.SetProfileProperty("City", txtCity.Text)

    UserInfo.Profile.SetProfileProperty("CompanyName", txtCompanyName.Text)

    but it is not working for me. Have anybody came across any solution for custom property values?
    help will be appreciated.

    Thanks
    Aleem Qureshi


    One said..............

    In case anyone else wants to create a quick & easy custom registration page, here's what I did and it seems to work very well.

    I created a new ascx module with labels, texboxes, and dropdownlists, to hold all of the users profile data that and credential data (firstname/lastname/email/displayname) that I want the user to enter. Then I filled in the fields with existing profile data like this:
    ...
    txtCity.Text = UserInfo.Profile.GetPropertyValue("City")
    ...
    If the user hasn't already given this information, it will just appear as a blank textbox.

    Finally, I put a "Register" button with the code to write these values to the UserInfo object, like this:
    ...
    UserInfo.Profile.SetProfileProperty("City", txtCity.Text)
    ...

    Followed by this line which writes everything back to the database
    UserController.UpdateUser(PortalId, UserInfo)

    I still need to Validate the user input before I enter it, but that's not the topic here.

    That's basically it. I had one problem - the credential name was not the same as the Profile Name - and I solved that by writing back to both, like this:

    UserInfo.Profile.SetProfileProperty("FirstName", txtFirstName.Text) ' Writes to "UserProfile" table
    UserInfo.FirstName = txtFirstName.Text ' Writes to "Users" table


    One
    Aleem
    Nuke Newbie
    Nuke Newbie
    Posts:2


    --
    05/01/2008 9:50 AM
    I figured it out. You need to use InitialiseProfile function before using SetProfileProperty function

    UserInfo.Profile.InitialiseProfile(PortalSettings.PortalId)

    UserInfo.Profile.SetProfileProperty("CompanyName", txtCompanyName.Text)


    and it works!!

    Thanks
    Aleem Qureshi
    aa
    Nuke Newbie
    Nuke Newbie
    Posts:3


    --
    10/22/2008 2:18 PM
    i need a quick help on this please some one help me out ....
    how come the Username is non editable any ideas ? i need to create another profile property which is non editable ....any ideas are welcome
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    10/22/2008 8:07 PM
    This is by design, I think.  I don't know why this was done, but I suspect that it is related to the use of some aspnet membership tables in DotNetNuke.

    But ... there are some SQL scripts floating around that a host can use to change a username.  I suppose that you could use these in a special module and let a user change his username. 

    I'd suggestion caution and some research before putting a tool like that in the hands of users.  You might want to ask questions over on the DotNetNuke forum to see what those who really understand these things have to say.



    Joe Craig, Patapsco Research Group
    Complete DNN Support
    aa
    Nuke Newbie
    Nuke Newbie
    Posts:3


    --
    10/23/2008 7:32 AM
    Thanks for the reply . I was asking this question because i need one of my profile properties to be non -editable once it is entered .Since the username is non -editable in DNN i was just wondering how to acheive a value of a profile property to be non editable .....? ANy kind of suggestion would be help ful .Thanks
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    10/23/2008 8:09 AM
    I'm not sure that this can be done with the out-of-the-box DotNetNuke.  You'd want to make that property not visible, but you'll still want the user to be able to enter data when they register.

    I'd suggest that you take a look at DataSprings' Dynamic Registration module.  I'm pretty sure that you can do this with that module.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    aa
    Nuke Newbie
    Nuke Newbie
    Posts:3


    --
    10/23/2008 8:49 AM
    I want the profile property to be visible like any other profile property but the value should be read only or non editable (once the user enters the value it cant be changed just like username ) .Thanks


    ---