Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 13, 2025
1 parent 5a981ed commit 4ff8fb7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions install/createAdminUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
$user->setName($userName);
$user->setEmailVerified(1);
$userId = $user->save();
$sql = "UPDATE users SET isAdmin = 1, status = 'a' where id = {$userId}";

$insert_row = sqlDAL::writeSql($sql);
if ($insert_row) {
echo "Your user {$userName} is admin now";
echo "\n";
die();
}
}
}
echo "Bye";
Expand Down

0 comments on commit 4ff8fb7

Please sign in to comment.