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.0DNN Login and password policyDNN Login and password policy
Previous
 
Next
New Post
10/11/2007 4:44 PM
 

Note:  Actually I am using DNN 4+ and by mistake I have put in ASP.NET1.1. So here it is now.

 I like to know two things:

Question1.

I am trying to write a function which will return a direct login url, I mean by using this link user will be able to login to DNN site, they do not have to type login information. User name and password will be hardcode with the url.

So to achive this I am creating one webpage, for example AnotherLogin.aspx and URL will be something like, http://www.test.com/AnotherLogin.aspx?username=test&password=password. Now when user will click the link then into the page_load I am collecting login details., eg., username and password and calling DoLogin method

private void DoLogin(string username, string password) {

// Use DNN API to authenticate user

.................. NEED HELP HERE ............................

// if ok then forward to http://www.test.com

// or forward to http://www.test.com/LoginError.aspx

}

Can anybody tell me how can I do this? Is there any method/s I can call, which will not only authenticate user, but also will behave same as normal DNN login (when user manually providing login details and clicking login button).

Question2:

I have an existing system which has nearly 700 users and their password encrypted by MD5. I am trying to transfer those user to DNN membership without changing their password, so that user can use same password for DNN site. I have already writen a test method which is registering user automatically (not using the webform, automatic process, like loop though the record and add DNN user).

So now I just like to know what is the way to tell DNN, when I am calling UserController method to add user to DNN membership then not to encrypt the value what I am passing as a password? And using MD5 during direct login (see my question1)?

Thanks for any reply.

 
New Post
10/15/2007 11:31 AM
 
This will login a user if they are valid and return true if successful.


Private Function pf_DNNLogin(ByVal pUsername As String, ByVal pPassword As String) As Boolean
Dim loginStatus As UserLoginStatus = UserLoginStatus.LOGIN_FAILURE
Dim bLoggedIn As Boolean = False
'
' Login the user
Dim objUser As UserInfo = UserController.UserLogin(PortalId, pUsername, pPassword, "DNN", PortalSettings.PortalName, pf_IPAddress(), loginStatus, False)
Select Case loginStatus
Case UserLoginStatus.LOGIN_SUCCESS, UserLoginStatus.LOGIN_SUPERUSER
bLoggedIn = True
Case Else
bLoggedIn = False
End Select
'
' Return if logged in
Return bLoggedIn
End Function
 
New Post
10/15/2007 5:18 PM
 

I don't have your answers but perhaps these links have code that can help:

Single Sign On

DotNetNuke Web Services



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN Login and password policyDNN Login and password policy


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