mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
Update
This commit is contained in:
parent
5a981edcc8
commit
4ff8fb77b5
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,14 @@ if (!empty($userName) && !empty($userPass)) {
|
||||||
$user->setName($userName);
|
$user->setName($userName);
|
||||||
$user->setEmailVerified(1);
|
$user->setEmailVerified(1);
|
||||||
$userId = $user->save();
|
$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";
|
echo "Bye";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue