From 654da74364d84c3c065a2d81de343e2158c46b57 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 10 Jan 2011 16:27:54 +0000 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/actor/user/register.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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]}); + } } -- 2.11.0