From 588422e2f1b87af88cf931969ff63e752a1c3c9d Mon Sep 17 00:00:00 2001 From: botanic Date: Wed, 18 Dec 2013 11:45:10 -0800 Subject: [PATCH] fixed permissions --- .../server/ryzom_ams/www/html/installer/libsetup.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index f21fb0c04..17288784a 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -1685,14 +1685,11 @@ 'name' => "admin", 'pass' => $hashpass, 'mail' => "admin@admin.com", - 'permission' => 3, - 'lang' => "en" ); try{ - $dbw = new DBLayer("web"); - $user_id = $dbw->executeReturnId("INSERT INTO ams_user (Login, Password, Email, Permission, Language) VALUES (:name, :pass, :mail, :permission, :lang)",$params); - Users::createUser($params, $user_id); - Users::createPermissions($params); + $user_id = WebUsers::createWebuser($params['name'], $params['pass'],$params['mail']); + $result = Webusers::createUser($params, $user_id); + Users::createPermissions(array($params['name'])); $dbl = new DBLayer("lib"); $dbl->execute("UPDATE ticket_user SET Permission = 3 WHERE TUserId = :user_id",array('user_id' => $user_id)); print "The admin account is created, you can login with id: admin, pass: admin!"; @@ -1701,6 +1698,7 @@ print_r($e); } + echo '
Reload! '; touch("../is_installed");