public static void verify(final User unverified) { // You might want to wrap this into a transaction unverified.emailValidated = true; MorphiaObject.datastore.save(unverified); TokenAction.deleteByUser(unverified, Type.EMAIL_VERIFICATION); }
public void resetPassword(final UsernamePasswordAuthUser authUser, final boolean create) { // You might want to wrap this into a transaction this.changePassword(authUser, create); TokenAction.deleteByUser(this, Type.PASSWORD_RESET); }