Change Password
Hi all,
My website requires user to log in to view the site. I have created a login and logout module. All is working fine. The problem I am having now is my change password function. My code for change password
Authorizable authorizable = am.findAccount(name); if (authorizable!=null && authorizable.isUser()) { user = (User)authorizable; log.info("user id: " + user.getID()); user.changePassword(pwd); log.info("password changed"); }Then it will redirect:
if (path.indexOf(".")<0) { path += ".html"; } response.sendRedirect(path);But every time I change password, I get page error 401.
*INFO* [0:0:0:0:0:0:0:1 [1375326294129] GET /content/test/successful.html HTTP/1.1] org.apache.sling.commons.auth.impl.SlingAuthenticator handleLoginFailure: Unable to authenticate test_user: null *INFO* [0:0:0:0:0:0:0:1 [1375326294129] GET /content/test/successful.html HTTP/1.1] org.apache.sling.commons.auth.impl.SlingAuthenticator login: No handler for request (3 handlers available) *ERROR* [0:0:0:0:0:0:0:1 [1375326294129] GET /content/test/successful.html HTTP/1.1] org.apache.sling.commons.auth.impl.SlingAuthenticator doLogin: Cannot login: No AuthenticationHandler available to handle the request
I am using CQ5.3