<div>Hi I developed a module to manage users using OpenCMS Users, everything works fine but deleting user it does not work in 7.5.1 (we developed in 7.5.3 and works but production enviroment has 7.5.1</div><div><br></div><div>

<br></div><div>I get the error</div><div><br></div><div>org.opencms.file.CmsVfsException: Error al eliminar al usuario "<a href="mailto:xxxx@email.com">xxxx@email.com</a>".</div><div>        at org.opencms.file.CmsVfsException.createException(CmsVfsException.java:80)</div>

<div><br></div><div>        at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:238)</div><div>        at org.opencms.db.CmsDbContext.report(CmsDbContext.java:212)</div><div><br></div><div>        at org.opencms.db.CmsSecurityManager.deleteUser(CmsSecurityManager.java:5600)</div>

<div>        at org.opencms.db.CmsSecurityManager.deleteUser(CmsSecurityManager.java:1503)</div><div>        at org.opencms.file.CmsObject.deleteUser(CmsObject.java:1058)</div><div>        at com.tresipunt.test.register.AdminAction.deleteUser(AdminAction.java:109)</div>

<div>        at com.tresipunt.test.register.AdminAction.processAction(AdminAction.java:96)</div><div>        at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.com_tresipunt_test.elements.administrator.userList_jsp._jspService(userList_jsp.java:137)</div>

<div><br></div><div>        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)</div><div>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</div><div>        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)</div>

<div><br></div><div>    at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:238)</div><div>        at org.opencms.db.CmsDbContext.report(CmsDbContext.java:212)</div><div><br></div><div>        at org.opencms.db.CmsSecurityManager.deleteUser(CmsSecurityManager.java:5600)</div>

<div>        at org.opencms.db.CmsSecurityManager.deleteUser(CmsSecurityManager.java:1503)ç</div><div>        </div><div>        </div><div><br></div><div>public static String deleteUser(CmsObject cmso, String[] users){</div>

<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>try {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div><span class="Apple-tab-span" style="white-space:pre">             </span>CmsObject userObject = OpenCms.initCmsObject(cmso);</div>

<div><span class="Apple-tab-span" style="white-space:pre">              </span></div><div><span class="Apple-tab-span" style="white-space:pre">             </span>LOG.info("Log user as Admin to delete users");</div><div><span class="Apple-tab-span" style="white-space:pre">             </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">              </span>userObject.loginUser(Dictionary.USER_ADMIN,Dictionary.PASSWORD_ADMIN);</div><div><span class="Apple-tab-span" style="white-space:pre">               </span></div><div>

<span class="Apple-tab-span" style="white-space:pre">         </span>for(String user:users){</div><div><span class="Apple-tab-span" style="white-space:pre">              </span></div><div><span class="Apple-tab-span" style="white-space:pre">                     </span>userObject.deleteUser(user);</div>

<div><span class="Apple-tab-span" style="white-space:pre">              </span></div><div><span class="Apple-tab-span" style="white-space:pre">             </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">            </span></div>
<div>
<span class="Apple-tab-span" style="white-space:pre">         </span>return Dictionary.DELETE_OK;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>} catch (CmsException e) {</div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span></div><div><span class="Apple-tab-span" style="white-space:pre">             </span>e.printStackTrace();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">              </span>return Dictionary.DELETE_KO;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>}</div>

<div><br></div><div>}</div><div><br></div><div>Before call our deleteUser we do:</div><div><br></div><div><span class="Apple-style-span" style>if (cms.getRequestContext().currentProject().isOnlineProject()) {<br>            cmso.loginUser("myadmin", "mypassword");<br>

            cmso.getRequestContext().setCurrentProject(cmso.readProject("Offline"));<br>        }</span></div><div><br></div><div>Thanks in advance!!!!</div><div><br></div><div>Regards!</div><div>Antoni</div><div>

<br></div>