making sure the active card is linked from the "card" field on the user in the fleshe...
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Feb 2007 18:57:25 +0000 (18:57 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Feb 2007 18:57:25 +0000 (18:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@6933 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index 5043eb7..25b610a 100644 (file)
@@ -2698,6 +2698,11 @@ sub new_flesh_user {
                }
        }
 
+       $user->card( (grep { $U->is_true($_->active) } @{$user->cards})[0] )
+               if grep { /card$/ } @$fields and 
+                       grep { /cards/ } @$fields and 
+                       not $U->is_true($user->card->active);
+
        $e->rollback;
        $user->clear_passwd();
        return $user;