如何在Liferay中重新激活用户时保留密码

如何在Liferay中重新激活用户时保留密码,liferay,liferay-6,liferay-ide,Liferay,Liferay 6,Liferay Ide,我将一步一步地解释我的场景,这样你们就很容易正确理解这个问题 1) Im working on a portlet that creates users in to a Ldap server programatically 2) Liferay is configured with LDAP server with the import option enabled so the groups and users are imported to liferay 3) T

我将一步一步地解释我的场景,这样你们就很容易正确理解这个问题

   1) Im working on a portlet that creates users in to a Ldap server programatically
    2) Liferay is configured with LDAP server with the import option enabled so the groups and users are imported to liferay 
    3) The users and groups are listed in the control panel of Liferay
    4) I tried to login with those users and Login was successfull!!!
    5) Now i delete the user from my portlet  
我使用以下方法激活/停用用户

 public static void activateDeactiavteLportalUser(String  email,boolean status )
    {
        Company company;
        try
        {
            company = CompanyLocalServiceUtil.getCompanyByMx(PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID));
            long companyID = company.getCompanyId();
            User liferayuser=   UserLocalServiceUtil.getUserByEmailAddress( companyID, email );
               if(status)
               {
                   UserLocalServiceUtil.updateStatus(liferayuser.getUserId() , WorkflowConstants.STATUS_APPROVED);
               }
               else
               {
                   UserLocalServiceUtil.updateStatus(liferayuser.getUserId() , WorkflowConstants.STATUS_INACTIVE);
               }




        }
        catch ( PortalException | SystemException e )
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
现在来谈谈我的问题。当我停用一个用户时,密码字段变为空,我看到liferay的用户表已将列PasswordReset更新为1。 现在我无法登录该用户。是否可以阻止密码更新?或者我应该使用实际的删除用户方法来删除用户

Liferay线程: