Login a user
From OpenCms Wiki
(Difference between revisions)
(added basic sample code for how to login a user) |
m (formatting) |
||
Line 2: | Line 2: | ||
The simplest case to login a user is this: | The simplest case to login a user is this: | ||
− | CmsJspActionElement element = new CmsJspActionElement(pageContext, request, response); | + | CmsJspActionElement element = new CmsJspActionElement(pageContext, request, response); |
− | CmsJspLoginBean login = new CmsJspLoginBean(pageContext, request, response); | + | CmsJspLoginBean login = new CmsJspLoginBean(pageContext, request, response); |
− | login.login(id, password); | + | login.login(id, password); |
− | if (login.isLoginSuccess()) | + | if (login.isLoginSuccess()) |
− | + | //do stuff... |
Latest revision as of 17:29, 13 June 2007
If you want to manage the login yourself, there are some hints here: Custom Login Page.
The simplest case to login a user is this:
CmsJspActionElement element = new CmsJspActionElement(pageContext, request, response); CmsJspLoginBean login = new CmsJspLoginBean(pageContext, request, response);
login.login(id, password); if (login.isLoginSuccess()) //do stuff...