forked from Archives/Athou_commafeed
fetch user from database instead of using the one in the session to avoid hibernate exception
This commit is contained in:
@@ -325,7 +325,7 @@ public class UserREST {
|
||||
if (CommaFeedApplication.USERNAME_ADMIN.equals(user.getName()) || CommaFeedApplication.USERNAME_DEMO.equals(user.getName())) {
|
||||
return Response.status(Status.FORBIDDEN).build();
|
||||
}
|
||||
userService.unregister(user);
|
||||
userService.unregister(userDAO.findById(user.getId()));
|
||||
return Response.ok().build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user