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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Registering for DNN from a separate siteRegistering for DNN from a separate site
Previous
 
Next
New Post
7/11/2007 1:36 PM
 

Hey guys-

I have a website that links to my DNN Forums and Profiles and chat. The website is not using the DNN framework. I have successfully connected to the DNN database to get things like latest profiles and forum posts to appear on my home page but now I would like to be able to have someone register for a DNN account from my home page (or a sub page). Does this make sense?

I have been digging through the long list of stored procedures to find the ones used to add a user and have found "AddUser" but this has no password fields in it. Also, if someone registers using this stored procedure, are the records automatically created for the Forums_Users table? Or are multiple stored procedures called and ran on the click of the "Register" button?

Thanks!

 
New Post
7/11/2007 2:35 PM
 

 Ok so I found the password and membership table. Now I am even more lost. The stored procedure "aspnet_Membership_CreateUser" is insane. It doesn't really clarify anything for me. Would this be the only stored procedure I'd need to run? Or would it be too complex to be worth it?

 
New Post
8/30/2007 3:37 PM
 

I've been trying to find the actual register code to see what it run through as far as sp's.  I've searched and searched the forums to me it seems they must be using it out of the box as is.

I've found 6 tables that need to be populated for a new user:

users,userportals,userprofile,userroles, aspnet_membership, aspnet_users

Did you find info?  If so please pass on because I doubt we are alone on writing a custom registration.

thanks...

 
New Post
8/31/2007 11:08 AM
 

The below code is something I use in several apps. Note that some of it is driven by business rules - like a recursive function to make sure that username isn't used already - we create usernames automatically, thus the code. Also, passwords that comes out of the Core password generator seems too obscure for a normal person, so we wrote our own - thus the call to WebHelper.RandomPassword.Generate method. If you need more explanation to the following code, I'll be happy to provide it.

 private void btnSave__Click(object sender, System.EventArgs e)
 {

                DotNetNuke.Entities.Users.UserInfo user_ = new DotNetNuke.Entities.Users.UserInfo();

                user_.PortalID = PortalId;
                user_.FirstName = txtFName_.Text.Substring(0, 1).ToUpper() + txtFName_.Text.Substring(1);
                user_.Profile.FirstName = user_.FirstName;
                user_.LastName = txtLName_.Text.Substring(0, 1).ToUpper() + txtLName_.Text.Substring(1);
                user_.Profile.LastName = user_.LastName;

                try
                {
                    user_.UserID = Session["userId"] != null ? user_.UserID = int.Parse(Session["userId"].ToString()) : -1;
                    if (user_.UserID > -1)
                        user_ = new DotNetNuke.Entities.Users.UserController().GetUser(PortalId, user_.UserID);
                }
                catch { }
               
                user_.Profile.Street = ctlAddress_.Street;
                user_.Profile.Unit = ctlAddress_.Unit;
                user_.Profile.City = ctlAddress_.City;
                user_.Profile.Region = ctlAddress_.Region;
                user_.Profile.PostalCode = ctlAddress_.Postal;
                user_.Profile.Telephone = ctlAddress_.Telephone;
                user_.Email = txtEmail_.Text;

                user_.Membership.Email = txtEmail_.Text;

                if (user_.UserID > 0)
                {
                    DotNetNuke.Entities.Users.UserController.UpdateUser(PortalId, user_);
                }
                else
                {
                    user_.Username = user_.Profile.LastName.ToLower() + user_.Profile.FirstName.Substring(0, 1).ToLower();
                    user_.Membership.Username = user_.Username;
                    user_.Membership.Password = WebHelper.RandomPassword.Generate(8, 10);
                    user_.Membership.Approved = false;
                    user_.AffiliateID = -1;
                    CreateDNNUser(ref user_);
                }
         }
 
        private DotNetNuke.Entities.Users.UserInfo CreateDNNUser(ref DotNetNuke.Entities.Users.UserInfo user_)
        {
            UserCreateStatus createStatus = DotNetNuke.Entities.Users.UserController.CreateUser(ref user_);
            if (createStatus == UserCreateStatus.DuplicateUserName || createStatus == UserCreateStatus.UsernameAlreadyExists)
            {
                user_.Username = user_.Profile.LastName.ToLower() + user_.Profile.FirstName.Substring(0, 1).ToLower() + counter_.ToString();
                counter_++;
                user_.Membership.Username = user_.Username;
                CreateDNNUser(ref user_);
            }
            return user_;
        }


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post
9/13/2007 10:16 AM
 
I created custom registration module as on upper example and place to new page (RegPage). But when I go to this page, through Registration button, my module not visible on this page.
In Site settings "User page" = RegPage.
Please explain me, that I wrong do?

Sorry from bad English :)

Thanks!
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Registering for DNN from a separate siteRegistering for DNN from a separate site


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