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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesLogin user after RegistrationLogin user after Registration
Previous
 
Next
New Post
6/3/2010 6:07 PM
 
So I have been using this code found in a DNN Creative post in order to log a user in after registering with a custom module I put together. However, after upgrading to DNN 5.04.02, the code does not work and the user is not logged in.

So I was using this setup and it worked great - thank you!

However, I just upgraded to 05.04.02 (66) and this solution doesn't work anymore!


Here's the code (it's already public, so please post it as is so others can see what I'm doing):

Dim myUser As New DotNetNuke.Entities.Users.UserInfo()
Dim userLoginStatus As New DotNetNuke.Security.Membership.UserLoginStatus()
myUser = DotNetNuke.Entities.Users.UserController.ValidateUser(0, emailTextBox.Text.ToString, "password", "", "", "", userLoginStatus)
If userLoginStatus = DotNetNuke.Security.Membership.UserLoginStatus.LOGIN_SUCCESS OrElse userLoginStatus = DotNetNuke.Security.Membership.UserLoginStatus.LOGIN_SUPERUSER Then
'login the user ...
DotNetNuke.Entities.Users.UserController.UserLogin(PortalId, myUser, "", "", True)
End If

And for some reason, it just won't log the user in anymore. Any ideas?
 
New Post
6/3/2010 6:37 PM
 
is there any error?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/3/2010 7:33 PM
 
No, that's one of the strangest things, it just doesn't do the login, but no error is shown....
 
New Post
1/20/2011 9:55 AM
 
hi cameron,
please verify the portal user is trying to log in to. better way would be to use:

Dim myUser As New DotNetNuke.Entities.Users.UserInfo()
myUser = DotNetNuke.Entities.Users.UserController.ValidateUser(PortalSettings.Current.PortalId, emailTextBox.Text.ToString, "password", "", "", "", userLoginStatus)

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesLogin user after RegistrationLogin user after Registration


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