X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FSoneTemplatePage.java;h=0b6b76055f61e8598e37754de311e069f946135b;hp=9a8bd9b65969e871e46a87692d3eaaaf269d613a;hb=8b25ea98d342ed2e3e80914448156145a3e6757d;hpb=28e93b0b30bae85b3fd8a6f4348468a4695dbdb0 diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index 9a8bd9b..0b6b760 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -124,6 +124,21 @@ public class SoneTemplatePage extends TemplatePage { } /** + * Returns the currently logged in Sone. + * + * @param toadletContext + * The toadlet context + * @param create + * {@code true} to create a new session if no session exists, + * {@code false} to not create a new session + * @return The currently logged in Sone, or {@code null} if no Sone is + * currently logged in + */ + protected Sone getCurrentSone(ToadletContext toadletContext, boolean create) { + return webInterface.getCurrentSone(toadletContext, create); + } + + /** * Sets the currently logged in Sone. * * @param toadletContext