[rt-devel] how to store User->NickName ?

Kevin Falcone falcone at bestpractical.com
Thu Jul 24 10:25:21 EDT 2014


On Sat, Jul 19, 2014 at 04:11:37PM -0400, Al Joslin wrote:
> this seems like it should work, the column names are right out of the database
> everything except RealName and NickName works...
> 
> 	# update the record if there is any new information
> 	print "\tupdating user for name:".$device->{'name'}." w/$WHDClientId_name: ".$whd_client_id."\n";
> 
> 	my %userInfo = (
> 		Name => $device->{'name'},
> 		RealName => $device->{'name'},
> 		NickName => substr($device->{'name'},3,4),
> 		WorkPhone => $client->{'phone'},
> 		Address1 => $client->{'address'},
> 		City => $client->{'city'},
> 		State => $client->{'state'},
> 		Zip => $client->{'zip'}
> 	);
> 	
>     ( $success, $message ) = $user->CanonicalizeUserInfo(\%userInfo);
> 	unless ($success) {
> 		print "Error: $message [File: ", __FILE__, " Line: ", __LINE__, "]\n";
> 		next;
> 	}

I don't understand your code.  CanonicalizeUserInfo is an empty
subroutine.  Presumably you've built more infrastructure that you're
not showing.

https://github.com/bestpractical/rt/blob/stable/lib/RT/User.pm#L712

Even the documentation says "by default nothing is done".

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20140724/2cf252d2/attachment.pgp>


More information about the rt-devel mailing list