From: Elrond Date: Fri, 29 Mar 2013 13:48:08 +0000 (+0100) Subject: piwigo: Let getStatus return the current user. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=665946033e1c9eef775a84a538ceebe9f52c657e;p=mediagoblin.git piwigo: Let getStatus return the current user. If there is a user logged in, show his name. --- diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py index 6a246f18..5d7d371d 100644 --- a/mediagoblin/plugins/piwigo/views.py +++ b/mediagoblin/plugins/piwigo/views.py @@ -61,7 +61,11 @@ def pwg_getversion(request): @CmdTable("pwg.session.getStatus") def pwg_session_getStatus(request): - return {'username': "fake_user"} + if request.user: + username = request.user.username + else: + username = "guest" + return {'username': username} @CmdTable("pwg.categories.getList")