[rt-users] rt2-to-rt3-v1.6: importing users without EmailAddress
Carlos Canau
canau at keka.KPNQwest.pt
Wed Mar 26 09:20:06 EST 2003
Hi,
v1.6 doesn't import users that doesn't have EmailAddress. I open my
users without EmailAddress. Can I change
load_user($user->{'EmailAddress'} with load_user($user->{'Name'}
safely ?? It seems to work.
</canau
--- dumpfile-to-rt-3.0~ Wed Mar 26 11:30:04 2003
+++ dumpfile-to-rt-3.0 Wed Mar 26 14:10:38 2003
@@ -598,6 +598,7 @@
sub import_user {
my $user = shift;
+ printf "%s\n", scalar Dumper $user;
$user->{'Name'} = "Unnamed user ".$user->{'id'} unless ($user->{'Name'});
if ( $user->{'Name'} eq 'Nobody' ) {
$user_map->{ $user->{'id'} } = $RT::Nobody->Id;
@@ -617,7 +618,8 @@
unless ( $user->{'Password'} =~ '^\*' );
delete $user->{'Password'};
print ".";
- $user_obj = load_user($user->{'EmailAddress'});
+### $user_obj = load_user($user->{'EmailAddress'});
+ $user_obj = load_user($user->{'Name'});
unless ($user_obj->Id) {
my ($uid, $umsg) = $user_obj->Create( %{$user} );
}
More information about the rt-users
mailing list