Use following code to get the password of login user.
public string ReturnPw()
{
UserController uc = new UserController();
UserInfo ui = new UserInfo();
if (UserId > 0)
{
ui = uc.GetUser(this.PortalId, this.UserId);
string un = ui.Username.ToString();
UserInfo oUser = UserController.GetUserByName(this.PortalId, un);
if (oUser != null)
{
//Get the password
string pwrd = UserController.GetPassword(ref oUser, "");
return pwrd;
}
}
return "N/A";
}
No comments:
Post a Comment