1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2025-02-13 16:52:44 -03:00
parent 5a981edcc8
commit 4ff8fb77b5

View file

@ -26,6 +26,14 @@ if (!empty($userName) && !empty($userPass)) {
$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";