From e870d990a08f4fed0885c9b7920eda4b42d23769 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 1 Aug 2006 02:52:40 +0000 Subject: [PATCH] r992: Use an API to insert the admin user --- install/install.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/install/install.php b/install/install.php index fc01e95..fa5ad4a 100644 --- a/install/install.php +++ b/install/install.php @@ -183,19 +183,14 @@ if ($bugsys->in['mark'] == 6)

Your new user has been added.

load('functions'); + require_once('./includes/api_user.php'); - $salt = $funct->rand(15); - - $db->query(" - INSERT INTO " . TABLE_PREFIX . "user - (email, displayname, password, salt, authkey, showemail, showcolours, usergroupid) - VALUES - ('" . $bugsys->in['email'] . "', '" . $bugsys->in['displayname'] . "', - '" . md5(md5($bugsys->in['password']) . md5($salt)) . "', '$salt', - '" . $funct->rand() . "', 1, 1, 6 - )" - ); + $user = new UserAPI($bugsys); + $user->set('email', $bugsys->in['email']); + $user->set('displayname', $bugsys->in['displayname']); + $user->set('password', $bugsys->in['password']); + $user->set('usergroupid', 6); + $user->insert(); } // ################################################################### -- 2.22.5