Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. @Transactional
  2. @Security.Authenticated(Secured.class)
  3. public class ProfileController extends BaseController {
  4.    
  5.     (...)
  6.  
  7.     @Transactional
  8.     public static Result deleteProfile() {
  9.         Account current = Component.currentAccount();
  10.        
  11.     ...
  12.     // DELETING AND ANONYMIZING STUFF //
  13.     ...
  14.  
  15.         current.delete();
  16.  
  17.         flash("success", Messages.get("profile.delete.success"));
  18.         return AccountController.logout();
  19.     }
  20. }