Attachment 'CurrentUser.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - CurrentUser macro
4
5 Syntax:
6 [[CurrentUser]]
7
8 @copyright: 2006 by Oliver Siemoneit
9 @license: GNU GPL, see COPYING for details.
10 """
11
12 from MoinMoin import user
13
14 def execute(macro, args):
15 request = macro.request
16 _ = request.getText
17
18 if request.user.isCurrentUser():
19 name = request.user.name
20 aliasname = request.user.aliasname
21 if not aliasname:
22 aliasname = name
23 if aliasname == "":
24 return _('<unknown>')
25 return aliasname
26
27 return _('<unknown>')
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.