<< Back to previous view |
[QB-2920] Get Current logged in User
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 6.1.36 |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Phong Trinh | Assigned To: | Robin Shen |
Resolution: | Won't Fix | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown | ||
Environment: | Windows |
Description |
Hi Robin and Support Team,
Is there any way I can get my current logged in user via groovy or powershell script? Thanks ptrinh |
Comments |
Comment by Robin Shen [ 09/Mar/17 01:57 AM ] |
Just call "user" in your groovy script. If you want to use this variable from Powershell script, you will need to pass it as environment variable, say:
env var name: QB_USER env var value: ${user.name} |
Comment by Phong Trinh [ 17/Mar/17 02:24 AM ] |
Hi Robin,
May I get the user name (Trigger By) that triggers a build? It is triggered by schedule most of the time, but sometimes it is triggered by an user. Thanks, ptrinh |
Comment by Robin Shen [ 17/Mar/17 11:21 PM ] |
In that case, please call build.getRequester(). This value will be null if the build is run via schedule. |