Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Custom Register module - UserId = -1 after userLogin then GetCurrentUserInfo
Previous Previous
 
Next Next
New Post 1/20/2008 5:14 PM
User is offline Chris Wruck
11 posts
www.pro-masystems.com.au
10th Ranked


Custom Register module - UserId = -1 after userLogin then GetCurrentUserInfo 

I have written a customer Register module and have a problem where, after I have added the new user  using  UserController.CreateUser as follows:-

                With NewUserInfo
                    'Membership
                    .Membership.Username = UserName
                    .Membership.Email = Email
                    .Membership.Approved = True
                    .Membership.Password = Password
                    'DNN
                    .PortalID = PortalID
                    .Username = UserName
                    .FirstName = FirstName
                    .LastName = LastName
                    .Email = Email
                    .AffiliateID = DotNetNuke.Common.Utilities.Null.NullInteger
                    .DisplayName = DisplayName
                End With

                Users.UserController.CreateUser(NewUserInfo)

                NewUserInfo.Profile.SetProfileProperty("FirstName", FirstName)
                NewUserInfo.Profile.SetProfileProperty("LastName", LastName)
                NewUserInfo.Profile.SetProfileProperty("CorporateID", "2")

                Entities.Profile.ProfileController.UpdateUserProfile(NewUserInfo)
                NewUserInfo.Membership.UpdatePassword = False

and then login to the portal with that new username as follows:-

UserController.UserLogin(PortalSettings.PortalId, NewUserInfo, PortalSettings.PortalName, ipAddress,

False)

Dim objUser As DotNetNuke.Entities.Users.UserInfo = UserController.GetCurrentUserInfoThat objUser.UserID will be -1, rather than the UserID of the new user just created.  After moving to another page, DNN recognizes the new user login.  I just want to know why it's not being recognized immediately after executing UserLogin.

 

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Custom Register module - UserId = -1 after userLogin then GetCurrentUserInfo
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP