We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9fd67b commit 972b7b5Copy full SHA for 972b7b5
app/controllers/BaseController.java
@@ -18,6 +18,13 @@ public class BaseController extends Controller {
18
gsonBuilder.registerTypeAdapter(PagedResult.class, new PagedResultGsonAdapter());
19
}
20
21
+ @Before
22
+ //load the user for the view
23
+ private static void loadUser() {
24
+ if (session.get("uid") == null || !ObjectId.isValid(session.get("uid"))) { return; }
25
+ renderArgs.put("user", User.findById(session.get("uid")));
26
+ }
27
+
28
@Util
29
protected static void signin(User user) {
30
session.put("uid", user.getId());
0 commit comments