Hi,

We want to obtain new portal user ID by simply using our internal ID obtained 
from the person object as opposed to always consulting the ID generator for the 
"UP_USER" counter store.  We would like to propose the attached patch for the 
RDBMUserIdentityStore class to make it possible for subclasses to provide their 
own new ID implementation.  Please let me know if this change is reasonable? 

Thanks,
Tuy.


-- 
You are currently subscribed to [email protected] as: [EMAIL 
PROTECTED]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Index: uportal-impl/src/main/java/org/jasig/portal/RDBMUserIdentityStore.java
===================================================================
--- uportal-impl/src/main/java/org/jasig/portal/RDBMUserIdentityStore.java      
(revision 43595)
+++ uportal-impl/src/main/java/org/jasig/portal/RDBMUserIdentityStore.java      
(working copy)
@@ -314,7 +314,7 @@
                    }
 
                    // Get a new user ID for this user
-                   int newUID = 
CounterStoreFactory.getCounterStoreImpl().getIncrementIntegerId("UP_USER");
+                   int newUID = getNewPortalUID(person);
 
                    // Add new user to all appropriate tables
                    int newPortalUID = addNewUser(newUID, person, templateUser);
@@ -334,6 +334,10 @@
 
        return portalUser.getUserId();
    }
+  
+  protected int getNewPortalUID(IPerson person) throws Exception {
+       return 
CounterStoreFactory.getCounterStoreImpl().getIncrementIntegerId("UP_USER");
+  }
 
   static final protected void commit (Connection connection) {
     try {

Reply via email to