From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 10 Jan 2011 16:27:54 +0000 (+0000)
Subject: avoid fetching user settings for new user registration;  the result of fetching setti... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=654da74364d84c3c065a2d81de343e2158c46b57;p=evergreen%2Fmasslnc.git

avoid fetching user settings for new user registration;  the result of fetching settings with a null user id is that settings of the staff/editor were fetched instead, leading to settings that appeared to selected, but were not saved during submit

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19146 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index ea4279739c..63673a8ecf 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -385,9 +385,11 @@ function uEditFetchUserSettings(userId) {
     var names = userSettingTypes.map(function(obj) { return obj.name() });
 
     /* fetch any values set for this user */
-    userSettings = fieldmapper.standardRequest(
-        ['open-ils.actor', 'open-ils.actor.patron.settings.retrieve.authoritative'],
-        {params : [openils.User.authtoken, userId, names]});
+    if(userId) {
+        userSettings = fieldmapper.standardRequest(
+            ['open-ils.actor', 'open-ils.actor.patron.settings.retrieve.authoritative'],
+            {params : [openils.User.authtoken, userId, names]});
+    }
 }