Back to index

moin  1.9.0~rc2
WhoAmI.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 """
00003     MoinMoin - Tells who you are and whether the wiki trusts you.
00004 
00005     @copyright: 2005 MoinMoin:ThomasWaldmann
00006     @license: GNU GPL, see COPYING for details.
00007 """
00008 
00009 def execute(xmlrpcobj, *args):
00010     request = xmlrpcobj.request
00011     username = request.user.name
00012     if not username:
00013         username = "<unknown user>"
00014     valid = request.user.valid
00015     result = "You are %s. valid=%d." % (username.encode("utf-8"), valid)
00016     return xmlrpcobj._outstr(result)
00017