Need a script to connect to wifi based on user logged in

I know nothing of macs, just windows, but I need a script to connect to a specific wifi ssid based on the currently logged in user. Is this possible? This is not a school project; I need this for my home which is currently running a UAP AP Pro which allows me to create multiple access points. I have created an additional AP which has assigned OpenDNS for increased security for my little ones.


Solution 1:

I'd say there's no need of complicated solutions. Every users you created have a completely customizable environment. So, if you go to the System Preferences, Network, choose WiFi on the left (among different types of connections) and then click on the "Advanced" button. You'll see a list of preferred networks. The items in this list may be simply dragged. The one on the top will be the chosen one, even if there are other wifi networks you previously connected to. Obviously, you might also decide to delete the other networks, if you are sure you won't use them with that user.