From a67bbd05f6b70a18481a4627c9ec38566c17fd3a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 30 Nov 2005 20:53:31 +0000 Subject: [PATCH] =?utf8?q?Bug=20317489:=20Email=20preferences=20are=20not?= =?utf8?q?=20set=20for=20the=20new=20admin=20user=20-=20Patch=20by=20Fr?= =?utf8?q?=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dmkanat=20a?= =?utf8?q?=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- checksetup.pl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/checksetup.pl b/checksetup.pl index d5fe6b4ee0..3fbad23482 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1421,6 +1421,9 @@ import Bugzilla::User::Setting qw(add_setting); require Bugzilla::Util; import Bugzilla::Util qw(bz_crypt trim html_quote); +require Bugzilla::User; +import Bugzilla::User qw(insert_new_user); + # globals.pl clears the PATH, but File::Find uses Cwd::cwd() instead of # Cwd::getcwd(), which we need to do because `pwd` isn't in the path - see # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-09/msg00115.html @@ -4331,9 +4334,6 @@ if ($sth->rows == 0) { } } - # Crypt the administrator's password - my $cryptedpassword = bz_crypt($pass1); - if ($^O !~ /MSWin32/i) { system("stty","echo"); # re-enable input echoing } @@ -4343,12 +4343,7 @@ if ($sth->rows == 0) { $SIG{QUIT} = 'DEFAULT'; $SIG{TERM} = 'DEFAULT'; - $dbh->do( - q{INSERT INTO profiles (login_name, realname, cryptpassword, - disabledtext, refreshed_when) - VALUES (?, ?, ?, ?, ?)}, - undef, $login, $realname, $cryptedpassword, - '', '1900-01-01 00:00:00'); + insert_new_user($login, $realname, $pass1); } # Put the admin in each group if not already -- 2.47.2