diff options
Diffstat (limited to 'main/src/cgeo/geocaching/utils')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/LogTemplateProvider.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java index 76400cf..3507116 100644 --- a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java +++ b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java @@ -135,6 +135,13 @@ public final class LogTemplateProvider { @Override public String getValue(final LogContext context) { + final Geocache cache = context.getCache(); + if (cache != null) { + final IConnector connector = ConnectorFactory.getConnector(cache); + if (connector instanceof ILogin) { + return ((ILogin) connector).getUserName(); + } + } return Settings.getUsername(); } }); |
