Author: agilliland
Date: Sat Apr 28 14:38:22 2007
New Revision: 533427

URL: http://svn.apache.org/viewvc?view=rev&rev=533427
Log:
a little cleanup in register form.


Modified:
    roller/trunk/src/org/apache/roller/ui/core/struts2/RegisterForm.java

Modified: roller/trunk/src/org/apache/roller/ui/core/struts2/RegisterForm.java
URL: 
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/core/struts2/RegisterForm.java?view=diff&rev=533427&r1=533426&r2=533427
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/core/struts2/RegisterForm.java 
(original)
+++ roller/trunk/src/org/apache/roller/ui/core/struts2/RegisterForm.java Sat 
Apr 28 14:38:22 2007
@@ -51,7 +51,7 @@
     
     private static Log log = LogFactory.getLog(RegisterForm.class);
     
-    protected static String DEFAULT_ALLOWED_CHARS = "A-Za-z0-9";
+    public static String DEFAULT_ALLOWED_CHARS = "A-Za-z0-9";
     
     // this is a no-no, we should not need this
     private HttpServletRequest servletRequest = null;
@@ -81,9 +81,11 @@
     
     public String execute() {
         
+        
if(!RollerRuntimeConfig.getBooleanProperty("users.registration.enabled")) {
+            return "disabled";
+        }
+        
         try {
-            getBean().setPasswordText(null);
-            getBean().setPasswordConfirm(null);
             getBean().setLocale(Locale.getDefault().toString());
             getBean().setTimeZone(TimeZone.getDefault().getID());
             
@@ -114,10 +116,7 @@
     
     public String save() {
         
-        boolean reg_allowed =
-                
RollerRuntimeConfig.getBooleanProperty("users.registration.enabled");
-        
-        if ( !reg_allowed ) {
+        
if(!RollerRuntimeConfig.getBooleanProperty("users.registration.enabled")) {
             return "disabled";
         }
         
@@ -245,7 +244,7 @@
     
     
     // TODO: replace with struts2 validation
-    private void myValidate() {
+    protected void myValidate() {
         
         // if usingSSO, we don't want to error on empty password/username from 
HTML form.
         setFromSS0(false);


Reply via email to