Index: lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java =================================================================== diff -u --- lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java (revision 0) +++ lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java (revision a303153c0e7ba699c5c0649a4f8d1caf786d114a) @@ -0,0 +1,31 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.util; + +public class CentralConstants { + + public static final String MODULE_NAME = "central"; + +} Index: lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java =================================================================== diff -u -rf802b987f59494223c2a3906568fbd2f82187cee -ra303153c0e7ba699c5c0649a4f8d1caf786d114a --- lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java (.../PasswordChangeAction.java) (revision f802b987f59494223c2a3906568fbd2f82187cee) +++ lams_central/src/java/org/lamsfoundation/lams/web/PasswordChangeAction.java (.../PasswordChangeAction.java) (revision a303153c0e7ba699c5c0649a4f8d1caf786d114a) @@ -36,7 +36,9 @@ import org.apache.struts.action.ActionMessages; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.util.CentralConstants; import org.lamsfoundation.lams.util.HashUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -116,6 +118,10 @@ //service.updatePassword(login, HashUtil.sha1(password)); user.setPassword(HashUtil.sha1(password)); service.save(user); + + // make 'password changed' audit log entry + IAuditService auditService = (IAuditService) ctx.getBean("auditService"); + auditService.log(CentralConstants.MODULE_NAME, "Password changed for: "+user.getLogin()+"("+user.getUserId()+")"); } }