<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
On 20/08/12 15:44, Kevin Falcone wrote:<br>
<span style="white-space: pre;">> On Wed, Aug 15, 2012 at
12:12:21PM +0100, Giuseppe Sollazzo wrote:<br>
><br>
> There is no existing command line utility, but it's mostly a
matter of<br>
> a small perl script to load the user, calling SetPrivileged
on it and<br>
> then calling AddMember on the relevant group object.<br>
><br>
> -kevin</span><br>
<br>
Hi Kevin,<br>
I can't find much docs about the use of RT::User especially on RT4.
Any link, if you have it handy?<br>
<br>
What I'm trying to do is something like what follows (edit of
scripts found on the wiki):<br>
<br>
<br>
#!/usr/bin/perl<br>
use strict;<br>
use warnings;<br>
use Data::Dumper;<br>
BEGIN { die "You must define \$RT_HOME\n"<br>
unless exists $ENV{RT_HOME} };<br>
use lib "$ENV{RT_HOME}/lib";<br>
<br>
use RT;<br>
<br>
RT::LoadConfig();<br>
RT::Init();<br>
<br>
use RT::Interface::CLI qw(GetCurrentUser loc);<br>
use RT::Tickets;<br>
<br>
die "We need exactly 2 Arguments, Name & Email\n" unless
($#ARGV==1);<br>
<br>
my $UserName=shift @ARGV;<br>
my $Email=shift @ARGV;<br>
<br>
my $User = RT::User->new($Email);<br>
*<br>
#my
($id,$Message)=$User->Create(Name=>$UserName,EmailAddress=>$Email,Privileged=>1,Password=>'apassword');*<br>
#if ($id){<br>
# print $Message."\n";<br>
# }<br>
#else{<br>
# print"This is a error!\n$Message\n";<br>
#}<br>
<br>
Except I don't want to create a user, I want to load a user from the
RT user database. Is that possible? I've been searching for a couple
of days now without much success...<br>
<br>
Thanks,<br>
G<br>
<br>
- -- <br>
____________________________________<br>
<br>
Giuseppe Sollazzo<br>
Senior Systems Analyst<br>
Computing Services<br>
Information Services<br>
St. George's, University Of London<br>
Cranmer Terrace<br>
London SW17 0RE<br>
<br>
Email: <a class="moz-txt-link-abbreviated" href="mailto:gsollazz@sgul.ac.uk">gsollazz@sgul.ac.uk</a><br>
Direct Dial: +44 20 8725 5160<br>
Fax: +44 20 8725 3583<br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext" href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a><br>
<br>
iQEcBAEBAgAGBQJQNhy5AAoJEAqigArPBfJXRDkH/i9YBY2XHDHqB8hZIP/hZXdD<br>
jx+oqJfoxQa2+QtgbZu+24SZ8XPhqcFmAIhxMaJFrSGrMVD34V0JE1IHWq8mCq1v<br>
XFpj19QHwW2vxAQu5DB6CYX2+DuyYDCJ8/RgAnPmT/ZB7y8mNldmpp8IDAxznPZW<br>
+AtxcJFNAhZDsp+vC6/XJdnQwh67c9tzHGI1tpT66soIsu4RppGNiH9GHMmlaGid<br>
xZnNPlDU6HH6516bWMFC2/+CeZPjEEjqJiNwAXguigzGf3l/67GfTCarAOgVfcAR<br>
JO+oOnFIBOvXaLNPLdDoUeJpVm8KOYauydY+IXxhq2Ay80a2VSiEuA8stP9R+5c=<br>
=R4tq<br>
-----END PGP SIGNATURE-----<br>
<br>
</body>
</html>