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  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  Get user logged in after registration
Previous Previous
 
Next Next
New Post 9/2/2008 4:07 PM
User is offline Vladimir
3 posts
10th Ranked


Get user logged in after registration 

Hello Everybody!

I'm working on my custom registration interface and having a problem with it. I'm able to create new user by performing code like this :

        UserInfo user = new UserInfo();
        user.Username = txtUserName.Value.Trim();
        user.PortalID = PortalId;
        user.FirstName = txtFirstName.Value.Trim();
        user.LastName = txtLastName.Value.Trim();
        user.Membership.Username = txtUserName.Value.Trim();
        user.Membership.UpdatePassword = false;
        user.Membership.Password = txtPassword.Value;
        user.LastName = txtLastName.Value.Trim();
        user.IsSuperUser = false;
        user.Email = txtEmail.Value.Trim();
        user.DisplayName = txtFirstName.Value.Trim() + " " + txtLastName.Value.Trim();
       
        MembershipProvider.Instance().CreateUser(ref user);

Everything's going smoothly with this code, but I can't understand what else I should do to get user logged in after this process. I simply want user not to need passing login procedure just after he's done with registration.

That will be nice if somebody has idea about how to figure this out.

Thanks in advance!

 
New Post 9/2/2008 7:39 PM
User is offline Michael Washington
2848 posts
ADefWebserver.com
5th Ranked










Re: Get user logged in after registration 

// Login the User
UserController.UserLogin(PortalId, UserInfo, PortalSettings.PortalName, GetIPAddress(), true);

see:

http://www.adefwebserver.com/DotNetNukeHELP/Misc/AutoPortalLogin.htm



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  Get user logged in after registration
 


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.

 


Advanced Web Portals by Infoscaler
Infoscaler is a California based company that provides advanced Web Portals, E-commerce Sites, Database Applications and Intranet Solutions on the DotNetNuke and Microsoft.NET platforms.
www.infoscaler.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
Verndale - Web Development, Support, Hosting
Since 1998, Verndale has helped hundreds of emerging and midsize businesses maximize the value and reach of their web assets with a comprehensive offering of strategy, design, development, search marketing and support services.
www.verndale.com

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