Re: Register.java, template "email/Confirmation.vm" and a NullPointer
Nigel Tamplin <[email protected]> Sat, 20 Sep 2008 03:33:24 +0100
| Newsgroups | gmane.comp.java.scarab.devel |
|---|---|
| Message-ID | <[email protected]> |
Mck wrote: > On Thu, 2008-09-18 at 22:44 +0100, Nigel Tamplin wrote: > >> b) Register.java should still be doing a scarabR.setUser(su); >> > > Is that line in 0.21 code newly added? > Then it could be a case of merging 0.21 changes into trunk. > > ~mck > I've looked into this a bit more. The calls to setUser were lost during the refactoring that occurred only in the trunk, during change ------------------------------------------------------------------------ r10501 | ronvoe122 | 2007-12-16 12:19:38 +0000 (Sun, 16 Dec 2007) | 2 lines Refactored registration of new users. This should also fix SCB2337. ------------------------------------------------------------------------ That change was made 10 months ago, has generating the registration email really been broken in the trunk for 10 months? I've attached a patch of the changes I made to get the registration emails working. Nigel --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
patchfile
(text/plain, 731 B)
Index: src/java/org/tigris/scarab/actions/Register.java
===================================================================
--- src/java/org/tigris/scarab/actions/Register.java (revision 10623)
+++ src/java/org/tigris/scarab/actions/Register.java (working copy)
@@ -169,7 +169,7 @@
}
}
data.getUser().setTemp(ScarabConstants.SESSION_REGISTER, null);
-
+ scarabR.setUser(su);
sendConfirmationEmail(su, context);
setTarget(data, nextTemplate);
@@ -269,7 +269,7 @@
setTarget(data, template);
return;
}
-
+ scarabR.setUser(user);
sendConfirmationEmail(user, context);
scarabR.setConfirmMessage(L10NKeySet.ConfirmationCodeSent);