Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Checking Last IP Address used
Last Post 09-03-2011 04:29 AM by Josh Slaughter. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Josh SlaughterUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
08-26-2011 03:40 AM
    Hello,

    I purchased the Dynamic Login module and the main task that I'm trying to accomplish is, when the user logs in I want to check the last IP address that was used and recorded by DNN and if the timestamp on the last login is less than 24 hours, I need to make sure that the user is logging in from the same IP address as the previous one.  I'm pretty sure the way to accomplish this is to use SQL Validation.  I've written the query but for some reason, it doesn't seem to evaluate the ip address correctly.  I'm not sure if it's something with my code or with the module. This is the SQL that I have.  Any help with this would be greatly appreciated!!

    IF ( SELECT LEN(LastIPAddress)
         FROM   dbo.Users
         WHERE  UserID = $(UserID)
       ) < 1
        BEGIN
            SELECT  IsValid = 1
        END
    ELSE
        IF ( SELECT LEN(LastIPAddress)
             FROM   dbo.Users
             WHERE  UserID = $(UserID)
           ) > 1
            BEGIN
                IF ( SELECT DATEDIFF(HOUR, LastModifiedOnDate, GETDATE())
                     FROM   dbo.Users
                     WHERE  UserID = $(UserID)
                            AND UserId NOT IN ( 1, 2 )
                   ) < 24
                    BEGIN
                        DECLARE @IP AS VARCHAR(50)
                        SELECT  @IP = ( SELECT  LastIPAddress
                                        FROM    dbo.Users
                                        WHERE   UserID = $(UserID)
                                      )
                            
                        SELECT  IsValid = CASE WHEN @IP = $(IPAddress) THEN 1
                                               ELSE 0
                                          END                     
                    END
                ELSE
                    BEGIN
                        SELECT  IsValid = 1
                    END
               
            END
    Josh SlaughterUser is Offline
    going with the flow
    going with the flow
    Posts:55
    Avatar

    --
    09-03-2011 04:29 AM
    Does anyone know how I can check to see if the user's last login was less than 24 hours ago, that they are using the same IP Address? It seems that the DNN Users table is already updated with the new IP address by the time the SQL validation code is executed.

    With the SQL Validation, are you limited to only running queires and not inserting records? I created a stored procedure that would insert user info into a table so that I can track login information and the SP tested fine in SSMS but as soon as I added it to the Dynamic Login control it doesn't seem to work anymore. Are there any limitations to the kind of SQL statements you can execute?
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi