From 665946033e1c9eef775a84a538ceebe9f52c657e Mon Sep 17 00:00:00 2001 From: Elrond Date: Fri, 29 Mar 2013 14:48:08 +0100 Subject: [PATCH] piwigo: Let getStatus return the current user. If there is a user logged in, show his name. --- mediagoblin/plugins/piwigo/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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") -- 2.25.1