This is a configuration file option that defines an optional script to run upon successful login. The script invocation can contain macros in the parameters being passed to it. For example:
/data/WebGUI/sbin/doLogin.pl --configFile=dev.localhost.localdomain.conf --username=^FormParam(username);
The login script is called via the qx// operator. Use the sbin/_utility.skeleton file as a starting point for writing your script. There is also corresponding runOnLogout option.
See my Login Script submission in Add Ons for an example.
***Updated October 22, 2008: WebGUI no longer supports Windows. Plain Black recommends using the VMWare Appliance for Windows Installations (http://www.webgui.org/download)
As with many things, life is more difficult with Windows. To get this script to work, you must do the following:
The final command will look something like the follow:
c:\\data\\wre\\prereqs\\perl\\bin\\perl.exe c:\\data\\WebGUI\\sbin\\doLogin.pl --configFile=dev.localhost.localdomain.conf --username="^FormParam(username)";
Because the backslashes will be escaped when the config file gets read in, you need to escape each backslash which makes the command look like this:
c:\\\\data\\\\wre\\\\prereqs\\\\perl\\\\bin\\\\perl.exe c:\\\\data\\\\WebGUI\\\\sbin\\\\doLogin.pl --configFile=dev.localhost.localdomain.conf --username=\"^FormParam(username);\"
To associate the Perl interpreter with .pl extension so that it will allow parameters see this discussion. I had better luck just calling the Perl interpreter directly rather than relying on Windows to find it and pass the parameters.
Keywords: configuration