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.0FaceBoo Connect and Auto LoginFaceBoo Connect and Auto Login
Previous
 
Next
New Post
3/11/2009 4:35 PM
 

I need a little help!

I am working for integrate with facebook connect. Working good. But the problem is, when I validate the user and do internal loging, although the login status is successfull, but the site displaying the registration and login link still. Those are suppose to change to logout link.

Here is the code:

        Public Sub UserLogin(ByVal Username As String)
            Dim loginStatus As UserLoginStatus = UserLoginStatus.LOGIN_FAILURE
            Dim aspNetUser As MembershipUser = Membership.GetUser(Username)
            Dim Userpass As String = aspNetUser.GetPassword()

            Dim objUser As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.ValidateUser(PortalId, Username, Userpass, "DNN", "", PortalSettings.PortalName, IPAddress, loginStatus)
            DotNetNuke.Entities.Users.UserController.UserLogin(PortalId, objUser, PortalSettings.PortalName, IPAddress, True)
            Dim authenticated As Boolean = Null.NullBoolean
            Dim message As String = Null.NullString

            If loginStatus = UserLoginStatus.LOGIN_USERNOTAPPROVED Then
                'Check if its the first time logging in to a verified site
            Else
                authenticated = (loginStatus <> UserLoginStatus.LOGIN_FAILURE)
            End If

            'Raise UserAuthenticated Event
            Dim eventArgs As UserAuthenticatedEventArgs = New UserAuthenticatedEventArgs(objUser, Username, loginStatus, "DNN")
            eventArgs.Authenticated = authenticated
            eventArgs.Message = message
            OnUserAuthenticated(eventArgs)
        End Sub
 

Anyone can help a little?

 

Thanks


Uninoval Global Softwares
Email: shafiqhossain@uninovaglobal.com
 
New Post
3/12/2009 3:15 AM
 

I have fixed the problem. The Enable property of my facebook authentication was disable. Thats why even user validation was success, the login and registration link did not changed.

 

But I have another question. I used to validate as "DNN" type. But why the validation failed when i use my own "FaceBook" authentication type?

Here is the follwing lines not working:

Dim objUser As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.ValidateUser(PortalId, Username, "", "FaceBook", "", PortalSettings.PortalName, IPAddress, loginStatus)

Dim eventArgs As UserAuthenticatedEventArgs = New UserAuthenticatedEventArgs(objUser, Username, loginStatus, "FaceBook")

 

I check it retured LOGIN_FAILURE message when validate.

Anyone suggest what to do ?

 

Thanks

 


Uninoval Global Softwares
Email: shafiqhossain@uninovaglobal.com
 
New Post
3/12/2009 4:43 AM
 

afaik you cannot use your own validation type to validate a dnn user against the dnn membership,you should use type DNN for that

also, please in future if you have multiple questions, use different threads for those questions.

also, i moved this thread to a different forum, since it was not about any of the core authentication providers.


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
3/20/2009 2:32 PM
 

Here is a complete workable module.

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/296263/scope/posts/Default.aspx

Thanks

 


Uninoval Global Softwares
Email: shafiqhossain@uninovaglobal.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0FaceBoo Connect and Auto LoginFaceBoo Connect and Auto Login


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