fixed permissions
This commit is contained in:
parent
d6f0d99065
commit
26b8d32aac
1 changed files with 4 additions and 6 deletions
|
@ -1685,14 +1685,11 @@
|
||||||
'name' => "admin",
|
'name' => "admin",
|
||||||
'pass' => $hashpass,
|
'pass' => $hashpass,
|
||||||
'mail' => "admin@admin.com",
|
'mail' => "admin@admin.com",
|
||||||
'permission' => 3,
|
|
||||||
'lang' => "en"
|
|
||||||
);
|
);
|
||||||
try{
|
try{
|
||||||
$dbw = new DBLayer("web");
|
$user_id = WebUsers::createWebuser($params['name'], $params['pass'],$params['mail']);
|
||||||
$user_id = $dbw->executeReturnId("INSERT INTO ams_user (Login, Password, Email, Permission, Language) VALUES (:name, :pass, :mail, :permission, :lang)",$params);
|
$result = Webusers::createUser($params, $user_id);
|
||||||
Users::createUser($params, $user_id);
|
Users::createPermissions(array($params['name']));
|
||||||
Users::createPermissions($params);
|
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->execute("UPDATE ticket_user SET Permission = 3 WHERE TUserId = :user_id",array('user_id' => $user_id));
|
$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!";
|
print "The admin account is created, you can login with id: admin, pass: admin!";
|
||||||
|
@ -1701,6 +1698,7 @@
|
||||||
print_r($e);
|
print_r($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
|
echo '<br><a href="'.$_SERVER['REQUEST_URI'].'" >Reload!</a> ';
|
||||||
|
|
||||||
touch("../is_installed");
|
touch("../is_installed");
|
||||||
|
|
Loading…
Reference in a new issue