Is there a way to add a current user label to the print composer in QGIS.
I thought there might be something similar to the $CURRENT_DATE format available.
This would be in a windows environment.
Currently, this is an unfulfilled feature request (see Feature #1385).
You could add your ideas for new 'tokens' (or 'fields' as they are monikered in the request). Remember to include recommended formatting options as per Qt classes for the data type, like has been done with the syntax of
However, there are better solutions than trying to implement all the types of tokens users might need or request (which could be an every-expanding list).
There are currently at least two means to implement a more robust solution:
A) Label text is optionally generated using the QGIS Expression Editor
This is currently the method used in the advanced labeling engine...
Since Composer labels are not relative to a map layer's data source, the section of
B) Label text (or tokens) is optionally the result of Python snippet(s)
While not as user-friendly as the Expression Editor solution, since it requires an understanding of Python, the implementation of such a feature would possibly only require a single development effort. Then, any textual aspect of a QGIS project, including its various Composer items, available via the PyQGIS API (i.e. Python Console), could be accessed, formatted and output to text.
The Python snippets could be wrapped in individual tokens and embedded in the current text of the text edit box, or be contained in an separate text edit box in the GUI, activated by check box. For security reasons, the code would probably not be auto-run on Composer launch (could be an option to allow always, though).
The separate text edit box approach would allow for Python code validation and the keying of specifically named Python functions, for example the following snippet:
would replace any number of in-text tokens named
Both of the above solutions are considerably more extensible than implementing individual tokens in-line in the QGIS source code. There may be other or better solutions, as well.
Dr. Hugentobler has recently been re-working the Print Composer in QGIS's master branch, so now is an ideal time to request such labeling features for the next version of QGIS. I'll add a feature request for these two ASAP.