You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2004/12/22 15:41:10 UTC
svn commit: r123095 - /lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java
Author: andreas
Date: Wed Dec 22 06:41:08 2004
New Revision: 123095
URL: http://svn.apache.org/viewcvs?view=rev&rev=123095
Log:
changePassword migrated to JX template
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java?view=diff&rev=123095&p1=lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java&r1=123094&p2=lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java&r2=123095
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/admin/UserPassword.java Wed Dec 22 06:41:08 2004
@@ -36,7 +36,7 @@
super.doCheckExecutionConditions();
String checkOldPassword = getParameter(CHECK_PASSWORD);
- if (checkOldPassword != null && checkOldPassword.equals(Boolean.toString(false))) {
+ if (checkOldPassword != null && checkOldPassword.equals(Boolean.toString(true))) {
String oldPassword = getParameter(OLD_PASSWORD);
boolean authenticated = this.user.authenticate(oldPassword);
if (!authenticated) {
@@ -52,6 +52,8 @@
*/
protected void doExecute() throws Exception {
super.doExecute();
+
+ user.setPassword(getParameter(NEW_PASSWORD));
}
private User user;
@@ -65,7 +67,7 @@
if (name.equals(UserProfile.USER_ID)) {
String userId = value;
this.user = getUserManager().getUser(userId);
- if (user == null) {
+ if (this.user == null) {
throw new RuntimeException("User [" + userId + "] not found.");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org