portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions JLoginUser.java CreateNewUserAndConfirm.java
Date Wed, 25 Apr 2001 00:09:23 GMT
taylor      01/04/24 17:09:23

  Modified:    src/java/org/apache/jetspeed/modules/actions JLoginUser.java
                        CreateNewUserAndConfirm.java
  Log:
  refactored creation of the default resource psml for new users
  
  Revision  Changes    Path
  1.10      +13 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLoginUser.java
  
  Index: JLoginUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLoginUser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JLoginUser.java	2001/04/19 23:16:49	1.9
  +++ JLoginUser.java	2001/04/25 00:09:22	1.10
  @@ -80,7 +80,7 @@
   import com.workingdogs.village.QueryDataSet;
   import com.workingdogs.village.Record;
   import org.apache.jetspeed.services.resources.JetspeedResources;
  -
  +import org.apache.jetspeed.services.profiler.ProfileManager;
   /**
       This class is responsible for logging a user into the system. It is also
       responsible for making sure that the user has been marked as confirmed. 
  @@ -229,6 +229,18 @@
           Log.note("User hasLoggedIn1: " + data.getUser().hasLoggedIn() );
           if ( data.getUser().hasLoggedIn() )
           {
  +           if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
  +           {
  +               // As the user is already in the db, we better
  +               // send the email, no matter the error we get here
  +               try {
  +                   String username = data.getParameters().getString("username");
  +                   ProfileManager.createUserProfile(data, username);
  +               } catch (Throwable t) {
  +                   Log.error(t);
  +               }
  +           }
  +
               // get a connection to the db
               DBConnection db = TurbineDB.getConnection();
               Connection connection = db.getConnection();
  
  
  
  1.12      +11 -8     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java
  
  Index: CreateNewUserAndConfirm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CreateNewUserAndConfirm.java	2001/04/19 23:16:49	1.11
  +++ CreateNewUserAndConfirm.java	2001/04/25 00:09:22	1.12
  @@ -97,6 +97,7 @@
       a confirmation email and then show the ConfirmRegistration screen.
       
       @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
  +    @author David S. Taylor <a href="mailto:david@bluesunrise.com">david@bluesunrise.com</a>
       @author Tom Adams <a href="mailto:tom@PIsoftware.com">tom@PIsoftware.com</a>
   
   */
  @@ -186,14 +187,6 @@
                   rec.setValue ( mapBuilder.getConfirmValue(), confirmValue );
                   rec.save();
                   data.setMessage(Localization.getString("CREATENEWUSERANDCONFIRM_CREATE"));
  -                if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
  -                // As the user is already in the db, we better
  -                // send the email, no matter the error we get here
  -                try {
  -                    ProfileManager.createUserProfile(data, username);
  -                } catch (Throwable t) {
  -                    Log.error(t);
  -                }
                   if (enableMail)
                   {
                       ActionLoader.getInstance().exec(data, "SendConfirmationEmail");
  @@ -262,6 +255,16 @@
             data.setACL(acl);
             data.save();
   
  +           if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
  +           {
  +               // As the user is already in the db, we better
  +               // send the email, no matter the error we get here
  +               try {
  +                   ProfileManager.createUserProfile(data, username);
  +               } catch (Throwable t) {
  +                   Log.error(t);
  +               }
  +           }
             // bring logged on user to homepage with internal redirect
             String homepage = TurbineResources.getString("screen.homepage");
             data.setScreen(homepage);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message