added logger
This commit is contained in:
parent
75737a9215
commit
b3a50c1a80
|
@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.gcube.portal.removeaccount.D4ScienceRemoveAccountManager;
|
||||
|
||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||
import com.liferay.portal.kernel.struts.BaseStrutsAction;
|
||||
import com.liferay.portal.kernel.struts.StrutsAction;
|
||||
import com.liferay.portal.model.User;
|
||||
|
@ -14,16 +15,15 @@ import com.liferay.portal.util.PortalUtil;
|
|||
* @author massi
|
||||
*/
|
||||
public class UpdateTermsOfUseAction extends BaseStrutsAction {
|
||||
|
||||
private static com.liferay.portal.kernel.log.Log _log = LogFactoryUtil.getLog(UpdateTermsOfUseAction.class);
|
||||
public String execute(StrutsAction originalStrutsAction, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
String agreement = request.getParameter("agreement");
|
||||
|
||||
if (agreement.compareTo("i-disagree")==0) { //the user did not agree
|
||||
User user = PortalUtil.getUser(request);
|
||||
try {
|
||||
D4ScienceRemoveAccountManager removeAccountManager = new D4ScienceRemoveAccountManager(user.getScreenName());
|
||||
removeAccountManager.doAsyncRemoveAccount();
|
||||
System.out.println("*** UpdateTermsOfUseAction user DID NOT AGREE, removeUser account for username=" + user.getScreenName() + " done with success, notified also the managers ... ");
|
||||
_log.info("*** UpdateTermsOfUseAction user DID NOT AGREE, removeUser account for username=" + user.getScreenName() + " done with success, notified also the managers ... ");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Reference in New Issue