<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [rt-users] Setting password on creation of account</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>> From: Ole Schelde [<A HREF="mailto:ole.schelde@a-aarhus.dk">mailto:ole.schelde@a-aarhus.dk</A>]</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Where do I have to change the code to automatically set a </FONT>
<BR><FONT SIZE=2>> users password</FONT>
<BR><FONT SIZE=2>> when the system creates theire account?</FONT>
</P>

<P><FONT SIZE=2>I think there are several ways to do it.  One is to edit your copy of /path/to/rt/lib/RT/Interface/Email.pm and find the lines where it's autocreating a user because it's received e-mail from someone it doesn't recognize.  (Just do a search on "Autocreated" and you'll get there.)</FONT></P>

<P><FONT SIZE=2>Find the call to NewUser->Create() and add a piece that's something like</FONT>
</P>

<P><FONT SIZE=2>Password => ($Username || $Address),</FONT>
</P>

<P><FONT SIZE=2>in the middle of the parameter area.  In this example, it will use the username as the password, or, if the username doesn't seem to be defined, it will use the e-mail address as the password.</FONT></P>

</BODY>
</HTML>