/** * Sets the password of this user.<p> * * @param value the password to set */ public void setPassword(String value) { try { OpenCms.getPasswordHandler().validatePassword(value); } catch (CmsSecurityException e) { throw new CmsIllegalArgumentException(e.getMessageContainer()); } m_password = value; }
/** * Sets the password of this user.<p> * * @param value the password to set */ public void setPassword(String value) { try { OpenCms.getPasswordHandler().validatePassword(value); } catch (CmsSecurityException e) { throw new CmsIllegalArgumentException(e.getMessageContainer()); } m_password = value; }
/** * @see org.opencms.gwt.shared.rpc.I_CmsCoreService#changePassword(java.lang.String, java.lang.String, java.lang.String) */ public String changePassword(String oldPassword, String newPassword, String newPasswordConfirm) throws CmsRpcException { CmsObject cms = getCmsObject(); CmsPasswordInfo passwordBean = new CmsPasswordInfo(cms); Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); try { passwordBean.setCurrentPwd(oldPassword); passwordBean.setNewPwd(newPassword); passwordBean.setConfirmation(newPasswordConfirm); passwordBean.applyChanges(); return null; } catch (CmsSecurityException e) { LOG.error(e.getLocalizedMessage(), e); return e.getMessageContainer().key(wpLocale); } catch (CmsIllegalArgumentException e) { LOG.warn(e.getLocalizedMessage(), e); return e.getMessageContainer().key(wpLocale); } catch (Exception e) { error(e); return null; // will never be executed } }