[Bps-public-commit] r8835 - rt2-to-rt3/trunk
falcone at bestpractical.com
falcone at bestpractical.com
Thu Aug 30 13:48:36 EDT 2007
Author: falcone
Date: Thu Aug 30 13:48:33 2007
New Revision: 8835
Modified:
rt2-to-rt3/trunk/ (props changed)
rt2-to-rt3/trunk/dumpfile-to-rt-3.0
Log:
r24258 at ketch: falcone | 2007-08-30 13:34:59 -0400
* handle users during incremental imports better by
ignoring Disabled and giving them a Name if needed
Modified: rt2-to-rt3/trunk/dumpfile-to-rt-3.0
==============================================================================
--- rt2-to-rt3/trunk/dumpfile-to-rt-3.0 (original)
+++ rt2-to-rt3/trunk/dumpfile-to-rt-3.0 Thu Aug 30 13:48:33 2007
@@ -87,6 +87,9 @@
my $users = $VAR1->{'User'};
foreach my $user ( @{$users} ) {
encode_hashref($user);
+ $user->{'Name'} = "Unnamed user " . $user->{'id'} unless ( $user->{'Name'} );
+ print "Checking user " . $user->{'Name'} . "\n";
+
my $obj = load_user( $user->{'Name'} );
if ( !$obj->Id && $user->{'EmailAddress'} ) {
$obj = load_user( $user->{'EmailAddress'} );
@@ -97,6 +100,7 @@
delete $user->{'EmailAddress'};
delete $user->{'Privileged'};
delete $user->{'id'};
+ delete $user->{'Disabled'};
foreach my $field ( keys %$user ) {
$obj->__Set( Field => $field, Value => $user->{$field} );
}
More information about the Bps-public-commit
mailing list