Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Context.openSession();
- Context.addProxyPrivilege(PrivilegeConstants.VIEW_PERSONS);
- UserService us = Context.getUserService();
- User user = us.getUserByUsername("tata");
- us.retireUser(u, "Not used anymore");
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- Context.removeProxyPrivilege(PrivilegeConstants.VIEW_PERSONS);
- Context.removeProxyPrivilege(PrivilegeConstants.EDIT_USERS);
- Context.closeSession();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement