My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help


Login |Register        Search

How to get password of a DotNetNuke login user

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   8/27/2012 10:37:51 PM    Author: Sibabrata Dash   Source: http://www.mindfiresolutions.com/How-to-get-password-of-a-DotNetNuke-login-user-1068.php   Views: 4439    0    0  
Tags:
Login Module develop User MembershipUser User Password Recover Password

 

In DotNetNuke it is not possible to extract the original password from the Database as the password is kept in an encrypted format.  However, it can be retrieved programmatically. Even UserInfo class present in DotNetNuke can be used to retrieve login user firstName, lastname, email etc  directly but cannot retrieve password. However, we can retrieve user password by creating an object of MembershipUser class present inside System.Web.Security namespace.

 

C# code to retrieve login and user password:

//Adding namespace -
using System.Web.Security;
 
//Creating object of MembershipUser class which will take username as parameter.
MembershipUser objUser = Membership.GetUser(UserInfo.Username);

//Storing password in a string variable
string strPassword = objUser.GetPassword();

Rating People: 10   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.