Use the Login commands in Python™ to retrieve information specific to the current GainSeeker User. This information can be edited on the Users tab of the Administration module.
See Python commands for other commands you can use with GainSeeker.
Contents [Hide] |
Syntax |
Example |
Description/Remarks |
New or changed in GainSeeker version |
login.computeruser |
login.computeruser |
Returns the name of the currently logged in Windows user. |
|
login.configid |
login.configid |
Returns the internal number of the GainSeeker configuration used by the currently logged in GainSeeker user. |
|
login.configname |
Returns the name of the GainSeeker configuration used by the currently logged in GainSeeker user. |
8.9 |
|
login.emailaddress |
login.emailaddress |
Returns the email address of the currently logged in GainSeeker user. The email address can be edited on the Users tab of the Administration module. |
|
login.emailpassword |
login.emailpassword |
Returns the email password of the currently logged in GainSeeker user. The email password can be edited on the Users tab of the Administration module. |
|
login.emailport |
login.emailport |
Returns the email port number for the GainSeeker system. The email port number can be edited on the Configurations tab of the Administration module in the System-wide settings branch. |
|
login.emailserver |
login.emailserver |
Returns the name of the email server for the GainSeeker system. The email server name can be edited on the Configurations tab of the Administration module in the System-wide settings branch. |
|
login.emailusername |
login.emailusername |
Returns the email user name of the currently logged in GainSeeker user. The email user name can be edited on the Users tab of the Administration module. |
|
login.roleid |
login.roleid |
Returns the internal number of the GainSeeker Role used by the currently logged in GainSeeker user. |
|
login.rtfstrs |
Returns a list of all possible real-time failure messages for the current user’s configuration. |
9.2 |
|
login.userid |
login.userid |
Returns the internal number of the currently logged in GainSeeker user. |
|
login.username |
login.username |
Returns the name of the currently logged in GainSeeker user. |
|
This example uses the Python Email command and is an example of using the Python login commands to set email properties instead of hard coding those properties inside the script.
#Set the username and password if login is required to send emails for the current user.
email.username = login.username
email.password = login.password
#Set the email port if using a non-standard port
email.port = login.emailport
#Set the name of the email server and the "from" address
email.server = login.emailserver
email.from_address = login.email.address
#Send the email
email.send("joanne@acme.com", "Daily email", "This is the message", False, None)
For more email examples, see the Python Email command.