Auto login based on client IP Address

I am wanting to setup an auto login based on the client IP address. Using if statements I can auto login the user and open the correct window for the client. It will become very cumbersome to keep up with as more clients are added. I have created a MySQL table setup with each clients IP address the username, login and startup window. How do I pull the info from the table to check the IP against the client IP then use the logon username, password and window?

Rhett Motley

Hi Rhett,

You do a database query in your Client Startup Script. Like this:

ipAddress ="[System]Client/Network/IPAddress").value query = """SELECT username, password, window FROM client_users WHERE ipaddress=?""" userInfo = system.db.runPrepQuery(query,[ipAddress])[0] if["username"],userInfo["password"]): system.nav.openWindow(userInfo["window"])

1 Like

Holy Scripting Bat Man! Its works.


1 Like

Of course it does. That is just the tip of the iceberg.

The number of things that you can do with scripting in Ignition is unlimited.


1 Like

How are you doing the autologin for the client?
We have a multi-monitor project (7.) that utilises the AutoLogin function
But want it to be based on IP Address.

I have tried overriding username/password properties etc, but nothing has worked so far…