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 CreateNewUserAndConfirm.java
Date Mon, 09 Apr 2001 05:01:22 GMT
taylor      01/04/08 22:01:22

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        CreateNewUserAndConfirm.java
  Log:
  set confirmValue into User object
  
  Revision  Changes    Path
  1.8       +12 -1     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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CreateNewUserAndConfirm.java	2001/03/07 06:43:35	1.7
  +++ CreateNewUserAndConfirm.java	2001/04/09 05:01:22	1.8
  @@ -71,6 +71,7 @@
   import org.apache.turbine.util.db.pool.DBConnection;
   import org.apache.turbine.util.db.map.TurbineMapBuilder;
   import org.apache.turbine.om.peer.BasePeer;
  +import org.apache.turbine.om.security.User;
   import org.apache.turbine.om.security.peer.TurbineUserPeer;
   import com.workingdogs.village.TableDataSet;
   import com.workingdogs.village.Record;
  @@ -88,6 +89,8 @@
       a confirmation email and then show the ConfirmRegistration screen.
       
       @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
  +    @author Tom Adams <a href="mailto:tom@PIsoftware.com">tom@PIsoftware.com</a>
  +
   */
   public class CreateNewUserAndConfirm extends Action
   {
  @@ -152,6 +155,14 @@
               TableDataSet tds = new TableDataSet( connection, TurbineUserPeer.getTableName()
);
               try
               {
  +                // create a unique confirmation string for the new user
  +                String confirmValue = GenerateUniqueId.getIdentifier();
  +
  +                // add the string to the user's perm storage
  +                User user = data.getUser();
  +                if (user != null) 
  +                    user.setPerm(User.CONFIRM_VALUE, confirmValue);
  +                // add the user's details to the database
                   Record rec = tds.addRecord();
                   rec.setValue ( mapBuilder.getPassword(), data.getParameters().getString("password")
);
                   rec.setValue ( mapBuilder.getUsername(), username );
  @@ -159,7 +170,7 @@
                   rec.setValue ( mapBuilder.getLastName(), data.getParameters().getString("lastname")
);
                   rec.setValue ( mapBuilder.getEmail(), data.getParameters().getString("email")
);
                   rec.setValue ( mapBuilder.getCreated(), new java.util.Date() );
  -                rec.setValue ( mapBuilder.getConfirmValue(), GenerateUniqueId.getIdentifier()
);
  +                rec.setValue ( mapBuilder.getConfirmValue(), confirmValue );
                   rec.save();
                   data.setMessage(Localization.getString("CREATENEWUSERANDCONFIRM_CREATE"));
                   if (JetspeedResources.getBoolean("services.ProfileManager.enable", false))
  
  
  

---------------------------------------------------------------------
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