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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Auto Login Module Development.... ?Auto Login Module Development.... ?
Previous
 
Next
New Post
4/14/2008 3:48 PM
 

You can load the user up yourself

DotNetNuke.Entities.Users.UserInfo info = DotNetNuke.Entities.Users.UserController.GetUserByName(0, "Mike");
string password = DotNetNuke.Entities.Users.UserController.GetPassword(info, info.Membership.PasswordAnswer);

Now you have their password and can check it against the password that has been passed in, ensuring it is valid.  Is there a reason you want to manually validate the password instead of just calling the ValidateUser method?  Try using the ValidateUser overload as follows:

DotNetNuke.Security.Membership.UserLoginStatus logStat = DotNetNuke.Security.Membership.UserLoginStatus.LOGIN_FAILURE;
DotNetNuke.Entities.Users.UserInfo info = DotNetNuke.Entities.Users.UserController.ValidateUser(portalId, userName,
 password, string.Empty, string.Empty, "255.255.255.1", ref logStat);

and then check for logStat == DotNetNuke.Security.Membership.UserLoginStatus.LOGIN_SUCCESS and that info != null.


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
4/14/2008 8:52 PM
 

Check out the IdentitySwitcher .  You will find the code to login with just username (no password needed).

http://www.dotnetnuke.com/Products/Development/Forge/tabid/824/ctl/Details/mid/3713/Projectid/28/Default.aspx?page=1&filter=1


Robert Tango
www.workcontrol.com
Custom Modules: UserManager|UserDirectory|UserImport|PortalSSO
 
New Post
4/16/2008 4:15 AM
 

Thanks for all the help guys, It was actually pretty simple

 

If your usernames and passwords are stored as MD5 hashes in your database you cannot retrieve them. However, if you use encryption it can be reversed and gives you the password in plain text.

I used

string pass = Membership.Provider.GetPassword(ui.Username, null);

And then logged in the user. Quite easy

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Auto Login Module Development.... ?Auto Login Module Development.... ?


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