Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2008-06-13 22:49:11 +0000
committerddunne2008-06-13 22:49:11 +0000
commit67aab9703589f8780f9e9304bf504fe1f2111e92 (patch)
treeae64409f3ba49673f902245c7cd1d65deb033bea
parentb0e6511c60da07ba3e013bb6ce90b2cb964caa5b (diff)
downloadorg.eclipse.osee-67aab9703589f8780f9e9304bf504fe1f2111e92.tar.gz
org.eclipse.osee-67aab9703589f8780f9e9304bf504fe1f2111e92.tar.xz
org.eclipse.osee-67aab9703589f8780f9e9304bf504fe1f2111e92.zip
-rw-r--r--org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/SkynetAuthentication.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/SkynetAuthentication.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/SkynetAuthentication.java
index 77c03484fdf..6db80dd5296 100644
--- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/SkynetAuthentication.java
+++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/SkynetAuthentication.java
@@ -101,6 +101,7 @@ public class SkynetAuthentication {
}
private void cacheUser(User user, OseeUser userEnum) throws OseeCoreException, SQLException {
+ // System.out.println("caching User " + user.getUserId());
// If cacheUser is called outside of the main loadUserCache, then load cache first
if (!isLoadingUsersCache) loadUsersCache();
// Check to make sure user is not in databaes more than once
@@ -205,6 +206,7 @@ public class SkynetAuthentication {
}
public static User createUser(OseeUser userEnum) throws OseeCoreException, SQLException {
+ instance.loadUsersCache();
User user =
instance.createUser(userEnum.getName(), userEnum.getEmail(), userEnum.getUserID(), userEnum.isActive());
instance.persistUser(user);
@@ -287,7 +289,7 @@ public class SkynetAuthentication {
public static User getUserByName(String name, boolean create) throws OseeCoreException, SQLException {
instance.loadUsersCache();
User user = instance.nameToUserCache.get(name);
- if (create) {
+ if (user == null && create) {
instance.persistUser(instance.createUser(name, "", name, true));
user = instance.nameToUserCache.get(name);
if (user == null) throw new UserNotInDatabase(

Back to the top